Conversation
- Use new version of recieve_share_intent that works with latest flutter - Switch to system_settings_2, a fork that works with latest flutter - Override intl version, to a version that works for latest flutter - Remove firebase
Not ideal to mash these together but lots of dart changes, mainly: - Remove firebase - Formatting changes - Add debugging support for notification actions - WIP fix for notification buttons
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Flutter app's build infrastructure and dependencies, removing Firebase integration and upgrading Flutter, Gradle, and Android SDK versions. The changes include significant dependency version bumps and API migrations necessitated by ~2 years of framework evolution.
Key Changes:
- Removed Firebase Analytics and Crashlytics integration
- Updated Flutter dependencies including
flutter_local_notifications(14.0.0 → 19.5.0),uuid(3.0.7 → 4.5.2), and others - Migrated Android build system to new Gradle plugin architecture
- Updated API calls for deprecated Flutter/Material 3 components (ButtonBar → OverflowBar, DropdownButtonFormField.value → initialValue)
- Modified notification action button handling for dismissal
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
pubspec.yaml |
Updated 15+ dependencies, removed Firebase packages, added git dependency for receive_sharing_intent |
pubspec.lock |
Resolved dependency versions with major version bumps across the board |
android/settings.gradle |
Migrated to modern Gradle plugin management with pluginManagement block |
android/gradle.properties |
Increased JVM heap size for builds |
android/build.gradle |
Removed buildscript block, updated to modern Gradle configuration |
android/app/build.gradle |
Updated to namespace-based configuration, Java 11, newer dependencies |
android/app/src/*/AndroidManifest.xml |
Removed package declarations, added notification broadcast receivers |
.tool-versions |
Added Flutter version specification |
lib/widgets/*.dart |
ButtonBar → OverflowBar, formatting changes for updated linter |
lib/pages/*.dart |
Removed Firebase calls, updated deprecated APIs (background → surface) |
lib/main.dart |
Removed Firebase initialization, updated sharing intent API |
lib/managers/notification_manager.dart |
Updated notification APIs, changed action button dismissal logic |
lib/firebase_options.dart |
Deleted (Firebase removed) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -82,10 +78,7 @@ android { | |||
| } | |||
| buildTypes { | |||
| release { | |||
There was a problem hiding this comment.
[nitpick] The minifyEnabled setting has been removed from the release build type. The comment mentioned it was for "testing to try and fix splash screen hang issue". If this was solving a real issue, removing it might reintroduce that problem. If the issue is resolved by other changes, consider documenting why it's no longer needed.
| release { | |
| release { | |
| // INFO: minifyEnabled was previously set for testing to try and fix splash screen hang issue. | |
| // It has been removed because the splash screen hang issue was resolved by other changes (e.g., [specify changes if known]). | |
| // If the issue reappears, consider re-adding minifyEnabled false. |
| 'time.year${_repetitionData.number == 1 ? '' : 's'}'))), | ||
| ], | ||
| value: _repetitionData.type, | ||
| initialValue: _repetitionData.type, |
There was a problem hiding this comment.
The value property has been removed from DropdownButtonFormField in favor of initialValue. While this change has been made, ensure that the dropdown properly updates when the value changes through user interaction. The initialValue parameter only sets the initial state and won't update if _repetitionData.type changes elsewhere in the widget lifecycle.
| initialValue: _repetitionData.type, | |
| value: _repetitionData.type, |
| translate('time.minute${_value == 1 ? '' : 's'}'))), | ||
| ], | ||
| value: _duration.inHours > 0 ? 'hour' : 'minute', | ||
| initialValue: _duration.inHours > 0 ? 'hour' : 'minute', |
There was a problem hiding this comment.
The value property has been removed from DropdownButtonFormField in favor of initialValue. While this change has been made, ensure that the dropdown properly updates when the value changes through user interaction. The initialValue parameter only sets the initial state and won't update if the duration type changes elsewhere in the widget lifecycle.
| DotsIndicator( | ||
| dotsCount: pages.length, | ||
| position: currentPage, | ||
| position: currentPage.toDouble(), |
There was a problem hiding this comment.
The position parameter type for DotsIndicator has been changed to double (using .toDouble()), but currentPage is an int. This suggests an API change in the dots_indicator package. Verify that the indicator properly displays the current page position with this change.
|
|
||
| if (android != null) { | ||
| var result = await android.requestPermission(); | ||
| var result = await android.requestNotificationsPermission(); |
There was a problem hiding this comment.
The method signature has changed from requestPermission() to requestNotificationsPermission(). While this updates to the new API, ensure this method exists in the version of flutter_local_notifications being used (19.5.0). The API change appears correct for newer versions of the plugin.
| var result = await android.requestNotificationsPermission(); | |
| var result = await android.requestPermission(); |
| required this.title, | ||
| this.subtitle, | ||
| required this.content, | ||
| this.image, | ||
| this.child, |
There was a problem hiding this comment.
The image property has been removed from the _LaunchDialogPage constructor but not from the class definition. This creates an inconsistency - the property is still declared in the class but can't be initialized. Either remove the property declaration entirely or keep the constructor parameter.
| <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" /> | ||
| <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" /> | ||
| <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.BOOT_COMPLETED"/> | ||
| <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> | ||
| <action android:name="android.intent.action.QUICKBOOT_POWERON" /> | ||
| <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> | ||
| </intent-filter> | ||
| </receiver> |
There was a problem hiding this comment.
New broadcast receivers have been added for handling notification actions and boot events. Ensure these receivers are compatible with flutter_local_notifications v19.5.0. The package name com.dexterous.flutterlocalnotifications should match what the plugin expects - verify this matches the plugin's implementation.
| Log.logger.e( | ||
| 'Failed to show notification "${item.title}" at ${item.dateTime}', | ||
| error: e); |
There was a problem hiding this comment.
The change from Log.logger.e('...', e) to Log.logger.e('...', error: e) suggests a breaking change in the logger API. However, this is inconsistent - some calls use the named parameter pattern while the old pattern appears elsewhere (line 179). Ensure all error logging calls are updated consistently to use the new API.
| receive_sharing_intent: | ||
| git: | ||
| url: https://github.com/KasemJaffer/receive_sharing_intent |
There was a problem hiding this comment.
[nitpick] The receive_sharing_intent dependency is now pointing to a Git repository instead of pub.dev. While this may be necessary for compatibility, consider:
- This creates a dependency on GitHub availability
- The specific commit (HEAD) is not pinned, which could lead to unexpected changes
- Consider pinning to a specific commit hash or tag for reproducibility
| dependency_overrides: | ||
| intl: ^0.20.2 |
There was a problem hiding this comment.
[nitpick] A dependency_override for intl is forcing version 0.20.2, but the main dependency specifies ^0.19.0. This override is necessary due to dependency conflicts, but it means the app is using a newer version than specified. Consider updating the main dependency to ^0.20.2 to make this explicit and remove the need for the override.
This is a bit of a WIP branch as I've not tested all functionality. Essentially it updates all the things: flutter version, gradle, android versions etc. As things are ~2 years out of date it's taken some significant effort to get it working again. One of the main differences is that the notification action buttons now work differently in order to dismiss an active notification (I've PoC'ed this change - but it was more a get it working than the ultimate end state solution).