Skip to content

Update build#40

Open
ash-sykes wants to merge 8 commits intotomc128:mainfrom
ash-sykes:build
Open

Update build#40
ash-sykes wants to merge 8 commits intotomc128:mainfrom
ash-sykes:build

Conversation

@ash-sykes
Copy link

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).

ash-sykes added 8 commits November 11, 2025 21:46
- 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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
'time.year${_repetitionData.number == 1 ? '' : 's'}'))),
],
value: _repetitionData.type,
initialValue: _repetitionData.type,
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
initialValue: _repetitionData.type,
value: _repetitionData.type,

Copilot uses AI. Check for mistakes.
translate('time.minute${_value == 1 ? '' : 's'}'))),
],
value: _duration.inHours > 0 ? 'hour' : 'minute',
initialValue: _duration.inHours > 0 ? 'hour' : 'minute',
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
DotsIndicator(
dotsCount: pages.length,
position: currentPage,
position: currentPage.toDouble(),
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

if (android != null) {
var result = await android.requestPermission();
var result = await android.requestNotificationsPermission();
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
var result = await android.requestNotificationsPermission();
var result = await android.requestPermission();

Copilot uses AI. Check for mistakes.
Comment on lines 224 to 227
required this.title,
this.subtitle,
required this.content,
this.image,
this.child,
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +83 to +92
<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>
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +297 to +299
Log.logger.e(
'Failed to show notification "${item.title}" at ${item.dateTime}',
error: e);
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +32
receive_sharing_intent:
git:
url: https://github.com/KasemJaffer/receive_sharing_intent
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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:

  1. This creates a dependency on GitHub availability
  2. The specific commit (HEAD) is not pinned, which could lead to unexpected changes
  3. Consider pinning to a specific commit hash or tag for reproducibility

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +44
dependency_overrides:
intl: ^0.20.2
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
tomc128 added a commit that referenced this pull request Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants