Skip to content

Commit

Permalink
Fix Compile time error
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Oct 16, 2024
1 parent c6c83a7 commit 7b39084
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
1 change: 0 additions & 1 deletion lib/data/core/utils/date_formatter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class DateFormatter {
}

String showBirthdays({required DateTime birthDate, required String name}) {
print(birthDate);
final today = DateTime.now().dateOnly;

if (birthDate.day == today.day && birthDate.month == today.month) {
Expand Down
39 changes: 19 additions & 20 deletions lib/ui/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,24 @@ class _AppState extends State<App> {
@override
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider(create: (context) => getIt.get<DrawerBloc>()),
// BlocProvider(
// create: (context) => getIt<NetworkConnectionBloc>()
// ..add(NetworkConnectionObserveEvent())),
BlocProvider(create: (context) => getIt<UserStateControllerBloc>()),
],
// child: BlocListener<NetworkConnectionBloc, NetworkConnectionState>(
// listenWhen: (previous, current) =>
// current is NetworkConnectionFailureState,
// listener: (context, state) {
// if (state is NetworkConnectionFailureState) {
// String connectionErrorMessage =
// context.l10n.network_connection_error;
// showSnackBar(context: context, msg: connectionErrorMessage);
// }
// },
child: widget.child,

);
providers: [
BlocProvider(create: (context) => getIt.get<DrawerBloc>()),
BlocProvider(
create: (context) => getIt<NetworkConnectionBloc>()
..add(NetworkConnectionObserveEvent())),
BlocProvider(create: (context) => getIt<UserStateControllerBloc>()),
],
child: BlocListener<NetworkConnectionBloc, NetworkConnectionState>(
listenWhen: (previous, current) =>
current is NetworkConnectionFailureState,
listener: (context, state) {
if (state is NetworkConnectionFailureState) {
String connectionErrorMessage =
context.l10n.network_connection_error;
showSnackBar(context: context, msg: connectionErrorMessage);
}
},
child: widget.child,
));
}
}
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ packages:
source: hosted
version: "2.6.2"
intl:
dependency: transitive
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 1.0.2+2

environment:
sdk: '>=3.2.0 <4.0.0'
flutter: '>=2.22.0 <3.0.0'
flutter: '>=3.24.0 <4.0.0'

dependencies:
flutter:
Expand Down Expand Up @@ -38,6 +38,7 @@ dependencies:
go_router: ^14.1.3
http: ^1.2.0
injectable: ^2.3.5
intl: any
image_picker: ^1.0.7
json_annotation: ^4.8.1
oauth2: ^2.0.2
Expand Down

0 comments on commit 7b39084

Please sign in to comment.