Conversation
There was a problem hiding this comment.
Pull request overview
Upgrades the project to Flutter 3.41+, updating dependency versions and aligning iOS/macOS/Android native scaffolding plus generated Dart code with new tooling outputs (Riverpod/ObjectBox/Protobuf/AutoRoute) and updated plugin APIs.
Changes:
- Bumps Flutter/Dart constraints and updates a broad set of Dart/Flutter dependencies (plus regenerated lockfiles).
- Migrates iOS to the Flutter 3.41+ implicit engine lifecycle and adds scene manifest support; updates Android Gradle/NDK versions.
- Regenerates Riverpod providers, protobuf outputs, AutoRoute routes, and ObjectBox model code; adjusts notification plugin API usage.
Reviewed changes
Copilot reviewed 48 out of 53 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/radiance-macos.sh | Adds macOS helper script for setting/unsetting Radiance env vars and launching the app with env overrides. |
| pubspec.yaml | Updates Flutter/Dart SDK constraints and bumps package versions. |
| pubspec.lock | Refreshes resolved dependency graph for new SDK/package versions. |
| macos/Podfile.lock | Updates macOS CocoaPods lockfile for new plugin/pod versions. |
| macos/Podfile | Raises macOS deployment target. |
| macos/Flutter/GeneratedPluginRegistrant.swift | Regenerated macOS plugin registrant (plugin list changed). |
| lib/lantern/protos/protos/auth.pbserver.dart | Removes generated pbserver export shim. |
| lib/lantern/protos/protos/auth.pbjson.dart | Regenerates protobuf JSON descriptors with updated formatting/ignores. |
| lib/lantern/protos/protos/auth.pbenum.dart | Regenerates protobuf enums header/ignores. |
| lib/lantern/protos/protos/auth.pb.dart | Regenerates protobuf message code (formatting/API updates). |
| lib/lantern/lantern_service_notifier.g.dart | Riverpod codegen update (providers now final, constructor non-const). |
| lib/features/window/provider/window_notifier.g.dart | Riverpod codegen update (creation handling updated). |
| lib/features/vpn/provider/vpn_status_notifier.g.dart | Riverpod codegen update. |
| lib/features/vpn/provider/vpn_notifier.g.dart | Riverpod codegen update. |
| lib/features/vpn/provider/server_location_notifier.g.dart | Riverpod codegen update. |
| lib/features/vpn/provider/available_servers_notifier.g.dart | Riverpod codegen update. |
| lib/features/system_tray/provider/system_tray_notifier.g.dart | Riverpod codegen update. |
| lib/features/split_tunneling/provider/website_notifier.g.dart | Riverpod codegen update. |
| lib/features/split_tunneling/provider/search_query.g.dart | Riverpod codegen update. |
| lib/features/split_tunneling/provider/apps_notifier.g.dart | Riverpod codegen update. |
| lib/features/split_tunneling/provider/apps_data_provider.g.dart | Riverpod codegen update + formatting changes for functional provider. |
| lib/features/split_tunneling/provider/app_list_provider.g.dart | Riverpod codegen update + formatting changes for functional provider. |
| lib/features/split_tunneling/provider/app_icon_provider.g.dart | Riverpod codegen update + family/provider formatting updates. |
| lib/features/private_server/provider/private_server_notifier.g.dart | Riverpod codegen update. |
| lib/features/private_server/provider/manage_server_notifier.g.dart | Riverpod codegen update. |
| lib/features/plans/provider/referral_notifier.g.dart | Riverpod codegen update. |
| lib/features/plans/provider/plans_notifier.g.dart | Riverpod codegen update. |
| lib/features/plans/provider/payment_notifier.g.dart | Riverpod codegen update. |
| lib/features/macos_extension/provider/macos_extension_notifier.g.dart | Riverpod codegen update. |
| lib/features/logs/provider/diagnostic_log_provider.g.dart | Riverpod codegen update + functional provider formatting changes. |
| lib/features/home/provider/local_storage_notifier.g.dart | Riverpod codegen update. |
| lib/features/home/provider/home_notifier.g.dart | Riverpod codegen update. |
| lib/features/home/provider/home_notifier.dart | Updates imports/formatting; switches proto import target. |
| lib/features/home/provider/feature_flag_notifier.g.dart | Riverpod codegen update. |
| lib/features/home/provider/data_cap_info_provider.g.dart | Riverpod codegen update. |
| lib/features/home/provider/app_setting_notifier.g.dart | Riverpod codegen update. |
| lib/features/home/provider/app_event_notifier.g.dart | Riverpod codegen update. |
| lib/features/developer/notifier/developer_mode_notifier.g.dart | Riverpod codegen update. |
| lib/features/auth/provider/auth_notifier.g.dart | Riverpod codegen update. |
| lib/features/account/provider/account_notifier.g.dart | Riverpod codegen update. |
| lib/core/services/notification_service.dart | Updates flutter_local_notifications calls to new named-parameter API. |
| lib/core/services/db/objectbox.g.dart | ObjectBox model regen (adds relationField + generatorVersion). |
| lib/core/router/router.gr.dart | AutoRoute codegen formatting changes. |
| lib/core/paths/path_notifier.g.dart | Riverpod codegen update. |
| lib/core/models/mapper/user_mapper.dart | Fixes proto import path (now points at auth.pb.dart). |
| ios/Runner/Info.plist | Adds scene manifest and removes deprecated main storyboard key. |
| ios/Runner/AppDelegate.swift | Migrates to implicit engine delegate lifecycle and scene-compatible registration. |
| ios/Podfile.lock | Updates iOS CocoaPods lockfile for new plugin/pod versions. |
| ios/Flutter/AppFrameworkInfo.plist | Removes MinimumOSVersion key. |
| android/settings.gradle | Bumps Android Gradle Plugin version. |
| android/gradle/wrapper/gradle-wrapper.properties | Bumps Gradle wrapper version. |
| android/app/build.gradle | Updates NDK version. |
| Makefile | Removes a build echo line. |
Comments suppressed due to low confidence (2)
macos/Flutter/GeneratedPluginRegistrant.swift:23
path_provider_foundationis no longer imported/registered in the generated macOS plugin registrant. Since the Dart codebase usespackage:path_provider/path_provider.darton macOS (e.g.getLibraryDirectory()), this will lead toMissingPluginExceptionat runtime for those calls. Ensure the macOS path_provider implementation is included in the plugin list and that the registrant imports/registers it (regenerate plugins if needed).
macos/Flutter/GeneratedPluginRegistrant.swift:43PathProviderPlugin.register(...)was removed from the generated macOS plugin registration list. Ifpath_providerAPIs are used on macOS (they are inPathNotifier), those method-channel calls will fail without registration. Ensure the correct macOS path_provider plugin is wired into the build and regenerateGeneratedPluginRegistrant.swiftso it registers the plugin again.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import 'package:lantern/lantern/protos/protos/auth.pbserver.dart'; | ||
| import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
|
|
||
| import '../../../lantern/protos/protos/auth.pb.dart'; |
There was a problem hiding this comment.
This file now imports auth.pb.dart via a relative URI (../../../lantern/...) while other parts of the app import the same generated protos via package:lantern/.... Mixing import URIs for the same file can cause duplicate-library/type identity issues (e.g., UserResponse from one import not assignable to the other). Prefer a single canonical import style (typically package:lantern/lantern/protos/protos/auth.pb.dart) and update any other relative imports accordingly.
| import '../../../lantern/protos/protos/auth.pb.dart'; | |
| import 'package:lantern/lantern/protos/protos/auth.pb.dart'; |
| import 'package:lantern/core/models/entity/user_entity.dart'; | ||
| import 'package:lantern/lantern/protos/protos/auth.pbserver.dart'; | ||
|
|
||
| import '../../../lantern/protos/protos/auth.pb.dart'; |
There was a problem hiding this comment.
auth.pb.dart is imported via a relative URI here, while other files import it via package:lantern/.... Importing the same generated library under different URIs can create distinct types at compile time (e.g., two different UserResponse classes), leading to hard-to-diagnose build errors. Use a single canonical import (typically the package: URI) consistently across the codebase.
| import '../../../lantern/protos/protos/auth.pb.dart'; | |
| import 'package:lantern/protos/protos/auth.pb.dart'; |
| GeneratedPluginRegistrant.register(with: registry) | ||
|
|
||
| // Configure Flutter local notifications background isolate. | ||
| // notificationSetup() |
There was a problem hiding this comment.
notificationSetup() is no longer invoked (it’s commented out in didInitializeImplicitFlutterEngine, and not called in didFinishLaunchingWithOptions). This will prevent FlutterLocalNotificationsPlugin.setPluginRegistrantCallback from being set, breaking background notification handling (and potentially foreground delegate setup) on iOS. Call notificationSetup() during engine initialization (or otherwise ensure the callback and UNUserNotificationCenter delegate are set exactly once).
| // notificationSetup() | |
| notificationSetup() |
This pull request includes several important updates across the iOS and Dart/Flutter codebases. The main themes are: migration to the new Flutter iOS engine lifecycle (with corresponding changes in
AppDelegate.swiftand Info.plist), updates to provider and notifier code generation for Riverpod, improvements to ObjectBox database model code, and corrections to notification service method signatures.iOS Flutter Engine Lifecycle & Scene Support:
AppDelegate.swiftto support the new Flutter 3.41+ iOS engine lifecycle by implementingFlutterImplicitEngineDelegate, moving plugin registration and method channel setup todidInitializeImplicitFlutterEngine, and updating event handler registration to be scene lifecycle-compatible. This prepares the app for multi-window and future Flutter iOS changes.Info.plistto include aUIApplicationSceneManifestwithFlutterSceneDelegate, enabling scene-based lifecycle and removing the deprecatedUIMainStoryboardFilekey.MinimumOSVersionkey fromAppFrameworkInfo.plistfor iOS, possibly to inherit the default or set elsewhere.Riverpod Provider/Notifier Code Generation:
consttofinaland updated provider class constructors to non-const in several files (e.g.,account_notifier.g.dart,auth_notifier.g.dart,developer_mode_notifier.g.dart,app_event_notifier.g.dart,path_notifier.g.dart). This aligns with recent Riverpod codegen changes and supports hot-reload and improved provider behavior. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]ObjectBox Database Model Improvements:
relationFieldnames to relation properties in the generated ObjectBox model, improving clarity and compatibility with the latest ObjectBox generator. [1] [2] [3]generatorVersionfield to the ObjectBox model definition to ensure compatibility and prompt regeneration if outdated.Notification Service API Corrections:
NotificationServiceto use named parameters as required by the latestflutter_local_notificationsAPI, fixing initialization, scheduling, and showing notifications. [1] [2] [3]Miscellaneous:
auth.pb.dartinuser_mapper.dartfor consistency and correctness.These changes collectively modernize the app's iOS integration, ensure compatibility with updated dependencies, and improve maintainability across both native and Dart/Flutter codebases.