This file contains hidden or 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
part 'chat_failure.freezed.dart'; | |
@freezed | |
class ChatFailure with _$ChatFailure { | |
const factory ChatFailure.serverError() = ServerError; | |
} |
This file contains hidden or 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
part 'auth_failure.freezed.dart'; | |
@freezed | |
class AuthFailure with _$AuthFailure { | |
const factory AuthFailure.serverError() = _ServerError; | |
const factory AuthFailure.tooManyRequests() = _TooManyRequests; | |
const factory AuthFailure.deviceNotSupported() = _DeviceNotSupported; | |
const factory AuthFailure.smsTimeout() = _SmsTimeout; | |
const factory AuthFailure.sessionExpired() = _SessionExpired; | |
const factory AuthFailure.invalidVerificationCode() = _InvalidVerificationCode; |
This file contains hidden or 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
@MaterialAutoRouter( | |
replaceInRouteName: 'Page,Route', | |
routes: <AutoRoute>[ | |
AutoRoute(page: NotificationPage, initial: true), | |
AutoRoute(page: OrangePage), | |
AutoRoute(page: PurplePage), | |
], | |
) | |
class $AppRouter {} |
This file contains hidden or 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
class NotificationNotifier extends StateNotifier<NotificationState> {...} |
This file contains hidden or 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
@freezed | |
class NotificationEvent with _$NotificationEvent { | |
const factory NotificationEvent.sendNormalNotification() = | |
SendNormalNotification; | |
const factory NotificationEvent.sendNotificationAfter3Seconds() = | |
SendNotificationAfter3Seconds; | |
} |
This file contains hidden or 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
@module | |
abstract class InjectableModule { | |
@singleton | |
AppRouter get appRouter => AppRouter(); | |
} |
This file contains hidden or 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
final getIt = GetIt.instance; | |
@InjectableInit() | |
void configureDependencies() => $initGetIt(getIt); |
This file contains hidden or 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
void main() { | |
//configureDependencies() method is for the Dependenct Injection | |
configureDependencies(); | |
runApp(const AppWidget()); | |
} |
This file contains hidden or 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
dependencies: | |
flutter: | |
sdk: flutter | |
auto_route: ^5.0.1 | |
flutter_riverpod: ^2.0.0 | |
awesome_notifications: ^0.7.1 | |
get_it: ^7.2.0 | |
injectable: ^1.5.3 | |
freezed_annotation: ^2.1.0 | |
cupertino_icons: ^1.0.2 |