diff --git a/lib/bloc/forecast/forecast_bloc.dart b/lib/bloc/forecast/forecast_bloc.dart index 5186ecc5..450399f7 100644 --- a/lib/bloc/forecast/forecast_bloc.dart +++ b/lib/bloc/forecast/forecast_bloc.dart @@ -40,11 +40,11 @@ class ForecastBloc extends Bloc { ); } } - } catch (_) { + } catch (e) { // ignore: invalid_use_of_visible_for_testing_member emit(state.copyWith( status: ForecastStatus.failure, - message: _.toString(), + message: e.toString(), )); } } @@ -163,10 +163,10 @@ class ForecastBloc extends Bloc { offset: state.offset + Const.forecastLimit, ), ); - } catch (_) { + } catch (e) { emit(state.copyWith( status: ForecastStatus.failure, - message: _.toString(), + message: e.toString(), )); } } diff --git a/pubspec.lock b/pubspec.lock index e4826108..d9e7f2c8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -290,10 +290,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_local_notifications: dependency: "direct main" description: @@ -489,10 +489,10 @@ packages: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" logging: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a1b5a406..f71eddc3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,7 +40,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.0 + flutter_lints: ^4.0.0 flutter_launcher_icons: ^0.13.0 bloc_test: ^9.1.1 mockito: ^5.4.0