diff --git a/android/app/build.gradle b/android/app/build.gradle index ff1b405..eb18b77 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -52,8 +52,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion - versionCode 24 - versionName "2.2.3" + versionCode 26 + versionName "2.2.5" } buildTypes { diff --git a/lib/main.dart b/lib/main.dart index 4ab4ffa..056f43b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -105,13 +105,13 @@ class _MyAppState extends State { updateLocation: updateLocation, icon: const Icon(Icons.gps_off, color: WHITE, size: 30,), place: backupName, - settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } } on LocationServiceDisabledException { return [dumbySearch(errorMessage: translation("location services are disabled.", settings[0]), updateLocation: updateLocation, icon: const Icon(Icons.gps_off, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } backupName = '${position.latitude},${position.longitude}'; @@ -123,7 +123,7 @@ class _MyAppState extends State { return [dumbySearch(errorMessage: translation(loc_status, settings[0]), updateLocation: updateLocation, icon: const Icon(Icons.gps_off, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } } if (proposedLoc == 'search') { @@ -137,7 +137,7 @@ class _MyAppState extends State { errorMessage: '${translation('Place not found', settings[0])}: $backupName', updateLocation: updateLocation, icon: const Icon(Icons.location_disabled, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } } @@ -155,22 +155,22 @@ class _MyAppState extends State { return [dumbySearch(errorMessage: translation("Weak or no wifi connection", settings[0]), updateLocation: updateLocation, icon: const Icon(Icons.wifi_off, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } on HttpExceptionWithStatus catch (hihi){ print(hihi.toString()); return [dumbySearch(errorMessage: "general error at place 1: ${hihi.toString()}", updateLocation: updateLocation, icon: const Icon(Icons.bug_report, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } on SocketException { return [dumbySearch(errorMessage: translation("Not connected to the internet", settings[0]), updateLocation: updateLocation, icon: const Icon(Icons.wifi_off, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } on Error catch (e, stacktrace) { print(stacktrace); return [dumbySearch(errorMessage: "general error at place 2: $e", updateLocation: updateLocation, icon: const Icon(Icons.wifi_off, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: absoluteProposed,), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } await setLastPlace(backupName, absoluteProposed); // if the code didn't fail @@ -191,7 +191,7 @@ class _MyAppState extends State { if (recall) { return [dumbySearch(errorMessage: "general error at place X: $e", updateLocation: updateLocation, icon: const Icon(Icons.bug_report, color: WHITE, size: 30,), - place: backupName, settings: settings, provider: weather_provider, latlng: 'search',), instantBackColor]; + place: backupName, settings: settings, provider: weather_provider, latlng: 'search',), instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor]; } else { return getDays(true); @@ -220,7 +220,7 @@ class _MyAppState extends State { color: instantBackColor, child: Center( child: LoadingAnimationWidget.staggeredDotsWave( - color: WHITE, + color: instantBackColor == WHITE ? const Color(0xff7a9dbc) : WHITE, size: 40, ), ), diff --git a/lib/search_screens.dart b/lib/search_screens.dart index 003506a..b2a69a3 100644 --- a/lib/search_screens.dart +++ b/lib/search_screens.dart @@ -432,7 +432,7 @@ class dumbySearch extends StatelessWidget { required this.updateLocation, required this.icon, required this.place, required this.settings, required this.provider, required this.latlng}); - final Color color = instantBackColor; + final Color color = instantBackColor == WHITE ? const Color(0xff7a9dbc) : instantBackColor; final FloatingSearchBarController controller = FloatingSearchBarController(); diff --git a/pubspec.lock b/pubspec.lock index e55a2bd..4573606 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -244,10 +244,10 @@ packages: dependency: transitive description: name: image - sha256: "49a0d4b0c12402853d3f227fe7c315601b238d126aa4caa5dbb2dcf99421aa4a" + sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" url: "https://pub.dev" source: hosted - version: "4.1.6" + version: "4.1.7" intl: dependency: transitive description: