-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adding app cubit to manage
isWeb
platform bool. #275
- Loading branch information
1 parent
43f87b3
commit 0638788
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
import 'package:equatable/equatable.dart'; | ||
|
||
part 'app_state.dart'; | ||
|
||
class AppCubit extends Cubit<AppState> { | ||
AppCubit({required bool isWeb}) : super(AppInitial(isWeb: isWeb)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
part of 'app_cubit.dart'; | ||
|
||
sealed class AppState extends Equatable { | ||
final bool isWeb; | ||
|
||
const AppState({required this.isWeb}); | ||
|
||
@override | ||
List<Object> get props => []; | ||
} | ||
|
||
final class AppInitial extends AppState { | ||
const AppInitial({required super.isWeb}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters