Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter 3.24.4 Support #20

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
strategy:
matrix:
flutterVersion:
- '3.22.0'
- '3.19.0'
- '3.24.0'
- '3.24.4'

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_adjust/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_adjust

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_apple_push_notifications/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_apple_p

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_apps_flyer/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_apps_fl

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ We try to support the newest version of Flutter and will not purposely keep supp

The Patapata team believes that it is important to keep up to date with the latest version of Flutter as in our expierence with real world applications, old versions of Flutter have trouble supporting the newer versions of Android and especially iOS.

Currently, we support Flutter 3.19.0 and above, with a minimum Dart version of 3.0.0 up to 4.0.0.
Currently, we support Flutter 3.24.0 and above, with a minimum Dart version of 3.0.0 up to 4.0.0.

We officially support Android, iOS fully, and best effort for Web and MacOS.
Windows and Linux are currently not supported.
Expand Down
4 changes: 4 additions & 0 deletions packages/patapata_core/lib/src/widgets/standard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,8 @@ abstract class StandardPageWithResult<T extends Object?, E extends Object?>
_navigator = Navigator(
key: _childNavigatorKey,
pages: _pageChildInstances![tParentPageInstance]!,
// TODO: To be addressed in the future.
// ignore: deprecated_member_use
onPopPage: (route, result) {
if (_delegate?.willPopPage != null) {
if (_delegate!.willPopPage!(route, result)) {
Expand Down Expand Up @@ -1424,6 +1426,8 @@ class StandardRouterDelegate extends RouterDelegate<StandardRouteData>
routeObserver,
],
pages: _pageInstances,
// TODO: To be addressed in the future.
// ignore: deprecated_member_use
onPopPage: _onPopPage,
);

Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_core

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

executables:
bootstrap:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_crashlytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_dynamic_links/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_messaging/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_remote_config/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_firebas

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_karte_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_karte_c

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_karte_variables/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository: https://github.com/gree/patapata/tree/main/packages/patapata_karte_v

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand Down
41 changes: 20 additions & 21 deletions packages/patapata_riverpod/lib/src/providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ part 'providers.g.dart';

/// The [App] instance.
@riverpod
App app(AppRef ref) {
App app(Ref ref) {
return getApp();
}

/// The current [User].
/// Whenever [User] changes, this provider will be updated.
@riverpod
Raw<User> user(UserRef ref) {
Raw<User> user(Ref ref) {
return ref.disposeAndListenChangeNotifier(ref.read(appProvider).user);
}

/// Access to [RemoteConfig].
/// Whenever [RemoteConfig] changes, this provider will be updated.
@riverpod
Raw<RemoteConfig> remoteConfig(RemoteConfigRef ref) {
Raw<RemoteConfig> remoteConfig(Ref ref) {
return ref.disposeAndListenChangeNotifier(ref.read(appProvider).remoteConfig);
}

/// Gets a [RemoteConfig] value as a [String].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
String remoteConfigString(RemoteConfigStringRef ref, String key,
String remoteConfigString(Ref ref, String key,
[String defaultValue = Config.defaultValueForString]) {
return ref.watch(remoteConfigProvider
.select((v) => v.getString(key, defaultValue: defaultValue)));
Expand All @@ -42,7 +42,7 @@ String remoteConfigString(RemoteConfigStringRef ref, String key,
/// Gets a [RemoteConfig] value as a [int].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
int remoteConfigInt(RemoteConfigIntRef ref, String key,
int remoteConfigInt(Ref ref, String key,
[int defaultValue = Config.defaultValueForInt]) {
return ref.watch(remoteConfigProvider
.select((v) => v.getInt(key, defaultValue: defaultValue)));
Expand All @@ -51,7 +51,7 @@ int remoteConfigInt(RemoteConfigIntRef ref, String key,
/// Gets a [RemoteConfig] value as a [double].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
double remoteConfigDouble(RemoteConfigDoubleRef ref, String key,
double remoteConfigDouble(Ref ref, String key,
[double defaultValue = Config.defaultValueForDouble]) {
return ref.watch(remoteConfigProvider
.select((v) => v.getDouble(key, defaultValue: defaultValue)));
Expand All @@ -60,7 +60,7 @@ double remoteConfigDouble(RemoteConfigDoubleRef ref, String key,
/// Gets a [RemoteConfig] value as a [bool].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
bool remoteConfigBool(RemoteConfigBoolRef ref, String key,
bool remoteConfigBool(Ref ref, String key,
[bool defaultValue = Config.defaultValueForBool]) {
return ref.watch(remoteConfigProvider
.select((v) => v.getBool(key, defaultValue: defaultValue)));
Expand All @@ -69,14 +69,14 @@ bool remoteConfigBool(RemoteConfigBoolRef ref, String key,
/// Access to [LocalConfig].
/// Whenever [LocalConfig] changes, this provider will be updated.
@riverpod
Raw<LocalConfig> localConfig(LocalConfigRef ref) {
Raw<LocalConfig> localConfig(Ref ref) {
return ref.disposeAndListenChangeNotifier(ref.read(appProvider).localConfig);
}

/// Gets a [LocalConfig] value as a [String].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
String localConfigString(LocalConfigStringRef ref, String key,
String localConfigString(Ref ref, String key,
[String defaultValue = Config.defaultValueForString]) {
return ref.watch(localConfigProvider
.select((v) => v.getString(key, defaultValue: defaultValue)));
Expand All @@ -85,7 +85,7 @@ String localConfigString(LocalConfigStringRef ref, String key,
/// Gets a [LocalConfig] value as a [int].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
int localConfigInt(LocalConfigIntRef ref, String key,
int localConfigInt(Ref ref, String key,
[int defaultValue = Config.defaultValueForInt]) {
return ref.watch(localConfigProvider
.select((v) => v.getInt(key, defaultValue: defaultValue)));
Expand All @@ -94,7 +94,7 @@ int localConfigInt(LocalConfigIntRef ref, String key,
/// Gets a [LocalConfig] value as a [double].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
double localConfigDouble(LocalConfigDoubleRef ref, String key,
double localConfigDouble(Ref ref, String key,
[double defaultValue = Config.defaultValueForDouble]) {
return ref.watch(localConfigProvider
.select((v) => v.getDouble(key, defaultValue: defaultValue)));
Expand All @@ -103,7 +103,7 @@ double localConfigDouble(LocalConfigDoubleRef ref, String key,
/// Gets a [LocalConfig] value as a [bool].
/// Whenever this [key] changes, this provider will be updated.
@riverpod
bool localConfigBool(LocalConfigBoolRef ref, String key,
bool localConfigBool(Ref ref, String key,
[bool defaultValue = Config.defaultValueForBool]) {
return ref.watch(localConfigProvider
.select((v) => v.getBool(key, defaultValue: defaultValue)));
Expand All @@ -112,7 +112,7 @@ bool localConfigBool(LocalConfigBoolRef ref, String key,
/// Access to [RemoteMessaging].
/// Whenever [RemoteMessaging] changes, this provider will be updated.
@riverpod
Raw<RemoteMessaging> remoteMessaging(RemoteMessagingRef ref) {
Raw<RemoteMessaging> remoteMessaging(Ref ref) {
return ref
.disposeAndListenChangeNotifier(ref.read(appProvider).remoteMessaging);
}
Expand All @@ -121,8 +121,7 @@ Raw<RemoteMessaging> remoteMessaging(RemoteMessagingRef ref) {
/// Whenever a new [RemoteMessage] is receieved via [RemoteMessaging.messages], this provider will be updated.
/// The first execution of this will return the initial message from [RemoteMessaging.getInitialMessage].
@riverpod
Stream<RemoteMessage> remoteMessagingMessages(
RemoteMessagingMessagesRef ref) async* {
Stream<RemoteMessage> remoteMessagingMessages(Ref ref) async* {
final tRemoteMessaging = ref.watch(remoteMessagingProvider);

final tInitialMessage = await tRemoteMessaging.getInitialMessage();
Expand All @@ -138,7 +137,7 @@ Stream<RemoteMessage> remoteMessagingMessages(
/// Whenever a new token is receieved via [RemoteMessaging.tokens], this provider will be updated.
/// The first execution of this will return the current token from [RemoteMessaging.getToken].
@riverpod
Stream<String?> remoteMessagingTokens(RemoteMessagingTokensRef ref) async* {
Stream<String?> remoteMessagingTokens(Ref ref) async* {
final tRemoteMessaging = ref.watch(remoteMessagingProvider);

yield await tRemoteMessaging.getToken();
Expand All @@ -147,20 +146,20 @@ Stream<String?> remoteMessagingTokens(RemoteMessagingTokensRef ref) async* {

/// Access to [Analytics].
@riverpod
Analytics analytics(AnalyticsRef ref) {
Analytics analytics(Ref ref) {
return ref.read(appProvider).analytics;
}

/// Access to the global [AnalyticsContext] from [Analytics.globalContext].
@riverpod
AnalyticsContext globalAnalyticsContext(GlobalAnalyticsContextRef ref) {
AnalyticsContext globalAnalyticsContext(Ref ref) {
return ref.read(analyticsProvider).globalContext;
}

/// Access to a stream of [NetworkInformation].
/// Whenever [NetworkInformation] changes, this provider will be updated.
@riverpod
NetworkInformation networkInformation(NetworkInformationRef ref) {
NetworkInformation networkInformation(Ref ref) {
final tNetworkPlugin = ref.read(appProvider).getPlugin<NetworkPlugin>()!;

final tSubscription = tNetworkPlugin.informationStream.listen((event) {
Expand All @@ -174,13 +173,13 @@ NetworkInformation networkInformation(NetworkInformationRef ref) {

/// Access to [PackageInfo].
@riverpod
PackageInfoPlugin packageInfo(PackageInfoRef ref) {
PackageInfoPlugin packageInfo(Ref ref) {
return ref.read(appProvider).package;
}

/// Access to [DeviceInfo].
@riverpod
DeviceInfoPlugin deviceInfo(DeviceInfoRef ref) {
DeviceInfoPlugin deviceInfo(Ref ref) {
return ref.read(appProvider).device;
}

Expand Down
Loading
Loading