Skip to content

Commit 4ddd301

Browse files
Fix android deprecation warnings (Baseflow#1648)
* Android updates * Format Android * fixed analyzer issues * update * update * update settings * change java version form 11 to 17 * update * update * cleanup * cleanup * cleanup * Update build.gradle * Update build.gradle * update * update * Update CHANGELOG.md * Update build.gradle * Update build.gradle * update * reverts breaking changes when you use Flutter 3.27.0 * updated build script * Temporary omit deprecation warnings. * fixes deprecation warning * updated changelog * updated message
1 parent 09f1cf0 commit 4ddd301

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

geolocator_android/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 5.0.0
2+
3+
- **BREAKING CHANGE:** for Flutter `3.27.0` and below. Make sure you'll upgrade Flutter to `3.29.0` or above before using this version.
4+
* Fixes deprecation warnings
5+
16
## 4.6.2
27

38
* Updates compileSDKVersion to 35

geolocator_android/lib/src/types/foreground_settings.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ class ForegroundNotificationConfig {
119119
'notificationText': notificationText,
120120
'notificationChannelName': notificationChannelName,
121121
'setOngoing': setOngoing,
122-
// Temporary ignored for release 4.6.1 (remove in future versions)
123-
// ignore: deprecated_member_use
124-
'color': color?.value,
122+
'color': color?.toARGB32(),
125123
};
126124
}
127125
}

geolocator_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: geolocator_android
22
description: Geolocation plugin for Flutter. This plugin provides the Android implementation for the geolocator.
33
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_android
44
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
5-
version: 4.6.2
5+
version: 5.0.0
66

77
environment:
88
sdk: ^3.5.0

geolocator_android/test/geolocator_android_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,9 +1511,7 @@ void main() {
15111511
);
15121512
expect(
15131513
jsonMap['foregroundNotificationConfig']['color'],
1514-
// Temporary ignored for release 4.6.1 (remove in future versions)
1515-
// ignore: deprecated_member_use
1516-
settings.foregroundNotificationConfig!.color!.value,
1514+
settings.foregroundNotificationConfig!.color!.toARGB32,
15171515
);
15181516
});
15191517

0 commit comments

Comments
 (0)