Skip to content

Commit f2a54b4

Browse files
authored
Upgrade to Flutter 3.16 (#297)
* MIgrate to new APIs * Use Material 3 by default * Migrate to onPopInvoked * Fix tab bar alignment * Upgrade packages * Update pods * Fix chat pop behavior on iOS
1 parent 5c217b1 commit f2a54b4

File tree

7 files changed

+184
-167
lines changed

7 files changed

+184
-167
lines changed

ios/Podfile.lock

Lines changed: 72 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,76 @@ PODS:
33
- Flutter
44
- device_info_plus (0.0.1):
55
- Flutter
6-
- Firebase/Analytics (10.16.0):
6+
- Firebase/Analytics (10.17.0):
77
- Firebase/Core
8-
- Firebase/Core (10.16.0):
8+
- Firebase/Core (10.17.0):
99
- Firebase/CoreOnly
10-
- FirebaseAnalytics (~> 10.16.0)
11-
- Firebase/CoreOnly (10.16.0):
12-
- FirebaseCore (= 10.16.0)
13-
- Firebase/Crashlytics (10.16.0):
10+
- FirebaseAnalytics (~> 10.17.0)
11+
- Firebase/CoreOnly (10.17.0):
12+
- FirebaseCore (= 10.17.0)
13+
- Firebase/Crashlytics (10.17.0):
1414
- Firebase/CoreOnly
15-
- FirebaseCrashlytics (~> 10.16.0)
16-
- Firebase/Performance (10.16.0):
15+
- FirebaseCrashlytics (~> 10.17.0)
16+
- Firebase/Performance (10.17.0):
1717
- Firebase/CoreOnly
18-
- FirebasePerformance (~> 10.16.0)
19-
- firebase_analytics (10.6.2):
20-
- Firebase/Analytics (= 10.16.0)
18+
- FirebasePerformance (~> 10.17.0)
19+
- firebase_analytics (10.7.0):
20+
- Firebase/Analytics (= 10.17.0)
2121
- firebase_core
2222
- Flutter
23-
- firebase_core (2.20.0):
24-
- Firebase/CoreOnly (= 10.16.0)
23+
- firebase_core (2.22.0):
24+
- Firebase/CoreOnly (= 10.17.0)
2525
- Flutter
26-
- firebase_crashlytics (3.4.2):
27-
- Firebase/Crashlytics (= 10.16.0)
26+
- firebase_crashlytics (3.4.4):
27+
- Firebase/Crashlytics (= 10.17.0)
2828
- firebase_core
2929
- Flutter
30-
- firebase_performance (0.9.3-2):
31-
- Firebase/Performance (= 10.16.0)
30+
- firebase_performance (0.9.3-4):
31+
- Firebase/Performance (= 10.17.0)
3232
- firebase_core
3333
- Flutter
34-
- FirebaseABTesting (10.16.0):
34+
- FirebaseABTesting (10.18.0):
3535
- FirebaseCore (~> 10.0)
36-
- FirebaseAnalytics (10.16.0):
37-
- FirebaseAnalytics/AdIdSupport (= 10.16.0)
36+
- FirebaseAnalytics (10.17.0):
37+
- FirebaseAnalytics/AdIdSupport (= 10.17.0)
3838
- FirebaseCore (~> 10.0)
3939
- FirebaseInstallations (~> 10.0)
4040
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
4141
- GoogleUtilities/MethodSwizzler (~> 7.11)
4242
- GoogleUtilities/Network (~> 7.11)
4343
- "GoogleUtilities/NSData+zlib (~> 7.11)"
4444
- nanopb (< 2.30910.0, >= 2.30908.0)
45-
- FirebaseAnalytics/AdIdSupport (10.16.0):
45+
- FirebaseAnalytics/AdIdSupport (10.17.0):
4646
- FirebaseCore (~> 10.0)
4747
- FirebaseInstallations (~> 10.0)
48-
- GoogleAppMeasurement (= 10.16.0)
48+
- GoogleAppMeasurement (= 10.17.0)
4949
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
5050
- GoogleUtilities/MethodSwizzler (~> 7.11)
5151
- GoogleUtilities/Network (~> 7.11)
5252
- "GoogleUtilities/NSData+zlib (~> 7.11)"
5353
- nanopb (< 2.30910.0, >= 2.30908.0)
54-
- FirebaseCore (10.16.0):
54+
- FirebaseCore (10.17.0):
5555
- FirebaseCoreInternal (~> 10.0)
5656
- GoogleUtilities/Environment (~> 7.8)
5757
- GoogleUtilities/Logger (~> 7.8)
58-
- FirebaseCoreExtension (10.16.0):
58+
- FirebaseCoreExtension (10.18.0):
5959
- FirebaseCore (~> 10.0)
60-
- FirebaseCoreInternal (10.16.0):
60+
- FirebaseCoreInternal (10.18.0):
6161
- "GoogleUtilities/NSData+zlib (~> 7.8)"
62-
- FirebaseCrashlytics (10.16.0):
62+
- FirebaseCrashlytics (10.17.0):
6363
- FirebaseCore (~> 10.5)
6464
- FirebaseInstallations (~> 10.0)
6565
- FirebaseSessions (~> 10.5)
6666
- GoogleDataTransport (~> 9.2)
6767
- GoogleUtilities/Environment (~> 7.8)
6868
- nanopb (< 2.30910.0, >= 2.30908.0)
6969
- PromisesObjC (~> 2.1)
70-
- FirebaseInstallations (10.16.0):
70+
- FirebaseInstallations (10.18.0):
7171
- FirebaseCore (~> 10.0)
7272
- GoogleUtilities/Environment (~> 7.8)
7373
- GoogleUtilities/UserDefaults (~> 7.8)
7474
- PromisesObjC (~> 2.1)
75-
- FirebasePerformance (10.16.0):
75+
- FirebasePerformance (10.17.0):
7676
- FirebaseCore (~> 10.5)
7777
- FirebaseInstallations (~> 10.0)
7878
- FirebaseRemoteConfig (~> 10.0)
@@ -82,20 +82,22 @@ PODS:
8282
- GoogleUtilities/ISASwizzler (~> 7.8)
8383
- GoogleUtilities/MethodSwizzler (~> 7.8)
8484
- nanopb (< 2.30910.0, >= 2.30908.0)
85-
- FirebaseRemoteConfig (10.16.0):
85+
- FirebaseRemoteConfig (10.18.0):
8686
- FirebaseABTesting (~> 10.0)
8787
- FirebaseCore (~> 10.0)
8888
- FirebaseInstallations (~> 10.0)
89+
- FirebaseSharedSwift (~> 10.0)
8990
- GoogleUtilities/Environment (~> 7.8)
9091
- "GoogleUtilities/NSData+zlib (~> 7.8)"
91-
- FirebaseSessions (10.16.0):
92+
- FirebaseSessions (10.18.0):
9293
- FirebaseCore (~> 10.5)
9394
- FirebaseCoreExtension (~> 10.0)
9495
- FirebaseInstallations (~> 10.0)
9596
- GoogleDataTransport (~> 9.2)
9697
- GoogleUtilities/Environment (~> 7.10)
9798
- nanopb (< 2.30910.0, >= 2.30908.0)
9899
- PromisesSwift (~> 2.1)
100+
- FirebaseSharedSwift (10.18.0)
99101
- Flutter (1.0.0)
100102
- flutter_native_splash (0.0.1):
101103
- Flutter
@@ -104,21 +106,21 @@ PODS:
104106
- FMDB (2.7.5):
105107
- FMDB/standard (= 2.7.5)
106108
- FMDB/standard (2.7.5)
107-
- GoogleAppMeasurement (10.16.0):
108-
- GoogleAppMeasurement/AdIdSupport (= 10.16.0)
109+
- GoogleAppMeasurement (10.17.0):
110+
- GoogleAppMeasurement/AdIdSupport (= 10.17.0)
109111
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
110112
- GoogleUtilities/MethodSwizzler (~> 7.11)
111113
- GoogleUtilities/Network (~> 7.11)
112114
- "GoogleUtilities/NSData+zlib (~> 7.11)"
113115
- nanopb (< 2.30910.0, >= 2.30908.0)
114-
- GoogleAppMeasurement/AdIdSupport (10.16.0):
115-
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.16.0)
116+
- GoogleAppMeasurement/AdIdSupport (10.17.0):
117+
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.17.0)
116118
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
117119
- GoogleUtilities/MethodSwizzler (~> 7.11)
118120
- GoogleUtilities/Network (~> 7.11)
119121
- "GoogleUtilities/NSData+zlib (~> 7.11)"
120122
- nanopb (< 2.30910.0, >= 2.30908.0)
121-
- GoogleAppMeasurement/WithoutAdIdSupport (10.16.0):
123+
- GoogleAppMeasurement/WithoutAdIdSupport (10.17.0):
122124
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
123125
- GoogleUtilities/MethodSwizzler (~> 7.11)
124126
- GoogleUtilities/Network (~> 7.11)
@@ -128,33 +130,33 @@ PODS:
128130
- GoogleUtilities/Environment (~> 7.7)
129131
- nanopb (< 2.30910.0, >= 2.30908.0)
130132
- PromisesObjC (< 3.0, >= 1.2)
131-
- GoogleUtilities/AppDelegateSwizzler (7.11.5):
133+
- GoogleUtilities/AppDelegateSwizzler (7.12.0):
132134
- GoogleUtilities/Environment
133135
- GoogleUtilities/Logger
134136
- GoogleUtilities/Network
135-
- GoogleUtilities/Environment (7.11.5):
137+
- GoogleUtilities/Environment (7.12.0):
136138
- PromisesObjC (< 3.0, >= 1.2)
137-
- GoogleUtilities/ISASwizzler (7.11.5)
138-
- GoogleUtilities/Logger (7.11.5):
139+
- GoogleUtilities/ISASwizzler (7.12.0)
140+
- GoogleUtilities/Logger (7.12.0):
139141
- GoogleUtilities/Environment
140-
- GoogleUtilities/MethodSwizzler (7.11.5):
142+
- GoogleUtilities/MethodSwizzler (7.12.0):
141143
- GoogleUtilities/Logger
142-
- GoogleUtilities/Network (7.11.5):
144+
- GoogleUtilities/Network (7.12.0):
143145
- GoogleUtilities/Logger
144146
- "GoogleUtilities/NSData+zlib"
145147
- GoogleUtilities/Reachability
146-
- "GoogleUtilities/NSData+zlib (7.11.5)"
147-
- GoogleUtilities/Reachability (7.11.5):
148+
- "GoogleUtilities/NSData+zlib (7.12.0)"
149+
- GoogleUtilities/Reachability (7.12.0):
148150
- GoogleUtilities/Logger
149-
- GoogleUtilities/UserDefaults (7.11.5):
151+
- GoogleUtilities/UserDefaults (7.12.0):
150152
- GoogleUtilities/Logger
151153
- in_app_review (0.2.0):
152154
- Flutter
153-
- nanopb (2.30909.0):
154-
- nanopb/decode (= 2.30909.0)
155-
- nanopb/encode (= 2.30909.0)
156-
- nanopb/decode (2.30909.0)
157-
- nanopb/encode (2.30909.0)
155+
- nanopb (2.30909.1):
156+
- nanopb/decode (= 2.30909.1)
157+
- nanopb/encode (= 2.30909.1)
158+
- nanopb/decode (2.30909.1)
159+
- nanopb/encode (2.30909.1)
158160
- package_info_plus (0.4.5):
159161
- Flutter
160162
- path_provider_foundation (0.0.1):
@@ -208,6 +210,7 @@ SPEC REPOS:
208210
- FirebasePerformance
209211
- FirebaseRemoteConfig
210212
- FirebaseSessions
213+
- FirebaseSharedSwift
211214
- FMDB
212215
- GoogleAppMeasurement
213216
- GoogleDataTransport
@@ -255,37 +258,38 @@ EXTERNAL SOURCES:
255258
SPEC CHECKSUMS:
256259
advanced_in_app_review: fe8fd50b8670cb3dbe67e4c26ca643f7aea8dbb8
257260
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
258-
Firebase: 25899099b77d255a636e3579c3d9dce10ec150d5
259-
firebase_analytics: c36906173f75cc28b016868ae51bdbff078b2804
260-
firebase_core: 2e0e89436a00b664a23bebb08859e5fede7215e9
261-
firebase_crashlytics: e262018554857dc5f082085d7f903b4ceb359727
262-
firebase_performance: cde12cbc8ae385d4e6659d812b9c6b4d92c0ac6c
263-
FirebaseABTesting: 03f0a8b88cf618350527f2c6a2234e29b9c65064
264-
FirebaseAnalytics: 7b41efc4eba5ff841cc94d5994b5f339361258f4
265-
FirebaseCore: 65a801af84cca84361ef9eac3fd868656968a53b
266-
FirebaseCoreExtension: 2dbc745b337eb99d2026a7a309ae037bd873f45e
267-
FirebaseCoreInternal: 26233f705cc4531236818a07ac84d20c333e505a
268-
FirebaseCrashlytics: d7fe23c5796f21104c753446b7a51d1737a88fb9
269-
FirebaseInstallations: b822f91a61f7d1ba763e5ccc9d4f2e6f2ed3b3ee
270-
FirebasePerformance: b005249b1c917a2699a3e25acaed1d6edbbf261f
271-
FirebaseRemoteConfig: 17ec974c6cac5cdc6cf8297062c2219851857f06
272-
FirebaseSessions: 96e7781e545929cde06dd91088ddbb0841391b43
261+
Firebase: f4ac0b02927af9253ae094d23deecf0890da7374
262+
firebase_analytics: d6f520c1030d2c1215851f6e332d39a489a30bd2
263+
firebase_core: efc9455611b8769fa90fbdae5da182600bd6901c
264+
firebase_crashlytics: 6a564f58db90be49c49d9ac100bc5cc3fcbf8267
265+
firebase_performance: 88df47771451ea5b7277a92c5d278f19500cc485
266+
FirebaseABTesting: d8b10ff4c6d1a9d6b11f02a08463ad5fd9fc6b1b
267+
FirebaseAnalytics: b9284f9fff10157a843e0422e908711f7bf3b9f2
268+
FirebaseCore: 534544dd98cabcf4bf8598d88ec683b02319a528
269+
FirebaseCoreExtension: 62b201498aa10535801cdf3448c7f4db5e24ed80
270+
FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
271+
FirebaseCrashlytics: d78651ad7db206ef98269e103ac38d69d569200a
272+
FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
273+
FirebasePerformance: ba663950bc790a4118c6aae13c6060e87888da75
274+
FirebaseRemoteConfig: bbd42790a4e84fde6aab7eae810b608e7b5c0bf6
275+
FirebaseSessions: f90fe9212ee2818641eda051c0835c9c4e30d9ae
276+
FirebaseSharedSwift: 62e248642c0582324d0390706cadd314687c116b
273277
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
274278
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
275279
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
276280
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
277-
GoogleAppMeasurement: 079d7632810e9d9704a99932547ba1554acc4342
281+
GoogleAppMeasurement: 4dcddfc7f102825c1c4e6422cb35567b101881a7
278282
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
279-
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
283+
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
280284
in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d
281-
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
285+
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
282286
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
283287
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
284288
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
285289
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
286290
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
287291
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
288-
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86
292+
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
289293
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
290294
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
291295

lib/screens/channel/chat/chat.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Chat extends StatelessWidget {
3535
children: [
3636
MediaQuery(
3737
data: MediaQuery.of(context).copyWith(
38-
textScaleFactor: chatStore.settings.messageScale,
38+
textScaler:
39+
TextScaler.linear(chatStore.settings.messageScale),
3940
),
4041
child: DefaultTextStyle(
4142
style: DefaultTextStyle.of(context)
@@ -95,18 +96,19 @@ class Chat extends StatelessWidget {
9596
),
9697
if (chatStore.settings.showBottomBar)
9798
ChatBottomBar(chatStore: chatStore),
98-
WillPopScope(
99-
onWillPop: Platform.isAndroid
100-
? () async {
101-
// If pressing the back button on Android while the emote menu is open, close it instead of going back to the streams list.
102-
if (chatStore.assetsStore.showEmoteMenu) {
103-
chatStore.assetsStore.showEmoteMenu = false;
104-
return false;
105-
} else {
106-
return true;
107-
}
108-
}
109-
: null,
99+
PopScope(
100+
canPop: Platform.isIOS,
101+
onPopInvoked: (didPop) {
102+
if (didPop) return;
103+
104+
// If pressing the back button on Android while the emote menu
105+
// is open, close it instead of going back to the streams list.
106+
if (chatStore.assetsStore.showEmoteMenu) {
107+
chatStore.assetsStore.showEmoteMenu = false;
108+
} else {
109+
Navigator.of(context).pop();
110+
}
111+
},
110112
child: AnimatedContainer(
111113
curve: Curves.ease,
112114
duration: const Duration(milliseconds: 200),

lib/screens/channel/chat/widgets/chat_user_modal.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class _ChatUserModalState extends State<ChatUserModal> {
9999

100100
return MediaQuery(
101101
data: MediaQuery.of(context).copyWith(
102-
textScaleFactor: widget.chatStore.settings.messageScale,
102+
textScaler: TextScaler.linear(widget.chatStore.settings.messageScale),
103103
),
104104
child: DefaultTextStyle(
105105
style: DefaultTextStyle.of(context)

lib/screens/channel/chat/widgets/reply_thread.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ReplyThread extends StatelessWidget {
3636
builder: (context) {
3737
return MediaQuery(
3838
data: MediaQuery.of(context).copyWith(
39-
textScaleFactor: chatStore.settings.messageScale,
39+
textScaler: TextScaler.linear(chatStore.settings.messageScale),
4040
),
4141
child: DefaultTextStyle(
4242
style: DefaultTextStyle.of(context)

lib/screens/settings/chat_settings.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,20 @@ class _ChatSettingsState extends State<ChatSettings> {
7474
),
7575
],
7676
),
77-
textScaleFactor: settingsStore.messageScale,
77+
textScaler:
78+
TextScaler.linear(settingsStore.messageScale),
7879
),
7980
SizedBox(height: settingsStore.messageSpacing),
8081
Text(
8182
'Hello! Here\'s a text preview.',
82-
textScaleFactor: settingsStore.messageScale,
83+
textScaler:
84+
TextScaler.linear(settingsStore.messageScale),
8385
),
8486
SizedBox(height: settingsStore.messageSpacing),
8587
Text(
8688
'And another for spacing without an emote!',
87-
textScaleFactor: settingsStore.messageScale,
89+
textScaler:
90+
TextScaler.linear(settingsStore.messageScale),
8891
),
8992
],
9093
),

lib/theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class FrostyThemes {
1616
: Colors.grey.shade800;
1717

1818
return ThemeData(
19-
useMaterial3: true,
2019
fontFamily: 'Inter',
2120
brightness: brightness,
2221
colorSchemeSeed: colorSchemeSeed,
@@ -57,6 +56,7 @@ class FrostyThemes {
5756
),
5857
tabBarTheme: const TabBarTheme(
5958
dividerColor: Colors.transparent,
59+
tabAlignment: TabAlignment.start,
6060
),
6161
tooltipTheme: TooltipThemeData(
6262
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),

0 commit comments

Comments
 (0)