From 7b39084237ad217d06c926ea9cc06c0cd7fd5f99 Mon Sep 17 00:00:00 2001 From: Sneha Canopas Date: Wed, 16 Oct 2024 19:04:40 +0530 Subject: [PATCH] Fix Compile time error --- lib/data/core/utils/date_formatter.dart | 1 - lib/ui/app.dart | 39 ++++++++++++------------- pubspec.lock | 2 +- pubspec.yaml | 3 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/lib/data/core/utils/date_formatter.dart b/lib/data/core/utils/date_formatter.dart index 0a5f0213..f14e1816 100644 --- a/lib/data/core/utils/date_formatter.dart +++ b/lib/data/core/utils/date_formatter.dart @@ -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) { diff --git a/lib/ui/app.dart b/lib/ui/app.dart index e073b6be..ce38371f 100644 --- a/lib/ui/app.dart +++ b/lib/ui/app.dart @@ -28,25 +28,24 @@ class _AppState extends State { @override Widget build(BuildContext context) { return MultiBlocProvider( - providers: [ - BlocProvider(create: (context) => getIt.get()), - // BlocProvider( - // create: (context) => getIt() - // ..add(NetworkConnectionObserveEvent())), - BlocProvider(create: (context) => getIt()), - ], - // child: BlocListener( - // 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()), + BlocProvider( + create: (context) => getIt() + ..add(NetworkConnectionObserveEvent())), + BlocProvider(create: (context) => getIt()), + ], + child: BlocListener( + 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, + )); } } diff --git a/pubspec.lock b/pubspec.lock index 98dc8180..159794a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -827,7 +827,7 @@ packages: source: hosted version: "2.6.2" intl: - dependency: transitive + dependency: "direct main" description: name: intl sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf diff --git a/pubspec.yaml b/pubspec.yaml index 4666c2b6..7d668a19 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: @@ -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