Skip to content

Commit c961630

Browse files
authored
Merge pull request #479 from stryder-dev/Update-to-flutter-3.32.0
Update to flutter 3.32.0
2 parents 3018af6 + f27cf79 commit c961630

20 files changed

Lines changed: 365 additions & 246 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [9.0.0]
2+
3+
#### (Flutter version support: v3.32.0)
4+
5+
- Adds all the flutter 3.32 additional properties for platform widgets
6+
- Removed deprecated parameters
7+
18
## [8.0.0]
29

310
#### (Flutter version support: v3.29.0)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
import lldb
6+
7+
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
8+
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
9+
base = frame.register["x0"].GetValueAsAddress()
10+
page_len = frame.register["x1"].GetValueAsUnsigned()
11+
12+
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
13+
# first page to see if handled it correctly. This makes diagnosing
14+
# misconfiguration (e.g. missing breakpoint) easier.
15+
data = bytearray(page_len)
16+
data[0:8] = b'IHELPED!'
17+
18+
error = lldb.SBError()
19+
frame.GetThread().GetProcess().WriteMemory(base, data, error)
20+
if not error.Success():
21+
print(f'Failed to write into {base}[+{page_len}]', error)
22+
return
23+
24+
def __lldb_init_module(debugger: lldb.SBDebugger, _):
25+
target = debugger.GetDummyTarget()
26+
# Caveat: must use BreakpointCreateByRegEx here and not
27+
# BreakpointCreateByName. For some reasons callback function does not
28+
# get carried over from dummy target for the later.
29+
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
30+
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
31+
bp.SetAutoContinue(True)
32+
print("-- LLDB integration loaded --")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
command script import --relative-to-command-file flutter_lldb_helper.py

lib/src/platform.dart

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ abstract class _DialogBaseData {
120120
final bool? useRootNavigator;
121121
final String? barrierLabel;
122122
final Offset? anchorPoint;
123+
final bool? requestFocus;
123124

124125
_DialogBaseData({
125126
this.builder,
@@ -128,13 +129,15 @@ abstract class _DialogBaseData {
128129
this.useRootNavigator,
129130
this.barrierLabel,
130131
this.anchorPoint,
132+
this.requestFocus,
131133
});
132134
}
133135

134136
class MaterialDialogData extends _DialogBaseData {
135137
final bool? useSafeArea;
136138
final Color? barrierColor;
137139
final TraversalEdgeBehavior? traversalEdgeBehavior;
140+
final AnimationStyle? animationStyle;
138141

139142
MaterialDialogData({
140143
super.builder,
@@ -143,9 +146,11 @@ class MaterialDialogData extends _DialogBaseData {
143146
super.useRootNavigator,
144147
super.barrierLabel,
145148
super.anchorPoint,
149+
super.requestFocus,
146150
this.useSafeArea,
147151
this.barrierColor,
148152
this.traversalEdgeBehavior,
153+
this.animationStyle,
149154
});
150155
}
151156

@@ -157,6 +162,7 @@ class CupertinoDialogData extends _DialogBaseData {
157162
super.useRootNavigator,
158163
super.barrierLabel,
159164
super.anchorPoint,
165+
super.requestFocus,
160166
});
161167
}
162168

@@ -170,6 +176,7 @@ Future<T?> showPlatformDialog<T>({
170176
bool useRootNavigator = true,
171177
String? barrierLabel,
172178
Offset? anchorPoint,
179+
bool? requestFocus,
173180
}) {
174181
if (isMaterial(context)) {
175182
assert(material?.builder != null || builder != null);
@@ -186,6 +193,8 @@ Future<T?> showPlatformDialog<T>({
186193
barrierLabel: material?.barrierLabel ?? barrierLabel,
187194
anchorPoint: material?.anchorPoint ?? anchorPoint,
188195
traversalEdgeBehavior: material?.traversalEdgeBehavior,
196+
animationStyle: material?.animationStyle,
197+
requestFocus: material?.requestFocus ?? requestFocus,
189198
);
190199
} else {
191200
assert(cupertino?.builder != null || builder != null);
@@ -199,16 +208,16 @@ Future<T?> showPlatformDialog<T>({
199208
cupertino?.barrierDismissible ?? barrierDismissible ?? false,
200209
barrierLabel: cupertino?.barrierLabel ?? barrierLabel,
201210
anchorPoint: cupertino?.anchorPoint ?? anchorPoint,
211+
requestFocus: material?.requestFocus ?? requestFocus,
202212
);
203213
}
204214
}
205215

206216
abstract class _ModalSheetBaseData {
207-
_ModalSheetBaseData({
208-
this.anchorPoint,
209-
});
217+
_ModalSheetBaseData({this.anchorPoint, this.requestFocus});
210218

211219
final Offset? anchorPoint;
220+
final bool? requestFocus;
212221
}
213222

214223
class MaterialModalSheetData extends _ModalSheetBaseData {
@@ -232,6 +241,7 @@ class MaterialModalSheetData extends _ModalSheetBaseData {
232241

233242
MaterialModalSheetData({
234243
super.anchorPoint,
244+
super.requestFocus,
235245
this.backgroundColor,
236246
this.elevation,
237247
this.shape,
@@ -262,6 +272,7 @@ class CupertinoModalSheetData extends _ModalSheetBaseData {
262272

263273
CupertinoModalSheetData({
264274
super.anchorPoint,
275+
super.requestFocus,
265276
this.imageFilter,
266277
this.semanticsDismissible,
267278
this.useRootNavigator,
@@ -278,6 +289,8 @@ Future<T?> showPlatformModalSheet<T>({
278289
required WidgetBuilder builder,
279290
MaterialModalSheetData? material,
280291
CupertinoModalSheetData? cupertino,
292+
Offset? anchorPoint,
293+
bool? requestFocus,
281294
}) {
282295
if (isMaterial(context)) {
283296
return showModalBottomSheet<T>(
@@ -295,14 +308,15 @@ Future<T?> showPlatformModalSheet<T>({
295308
routeSettings: material?.routeSettings,
296309
transitionAnimationController: material?.transitionAnimationController,
297310
constraints: material?.constraints,
298-
anchorPoint: material?.anchorPoint,
311+
anchorPoint: material?.anchorPoint ?? anchorPoint,
299312
useSafeArea: material?.useSafeArea ?? false,
300313
barrierLabel: material?.barrierLabel,
301314
scrollControlDisabledMaxHeightRatio:
302315
material?.scrollControlDisabledMaxHeightRatio ??
303-
_defaultScrollControlDisabledMaxHeightRatio,
316+
_defaultScrollControlDisabledMaxHeightRatio,
304317
showDragHandle: material?.showDragHandle,
305318
sheetAnimationStyle: material?.sheetAnimationStyle,
319+
requestFocus: material?.requestFocus ?? requestFocus,
306320
);
307321
} else {
308322
return showCupertinoModalPopup<T>(
@@ -314,7 +328,8 @@ Future<T?> showPlatformModalSheet<T>({
314328
barrierColor: cupertino?.barrierColor ?? _kModalBarrierColor,
315329
barrierDismissible: cupertino?.barrierDismissible ?? true,
316330
routeSettings: cupertino?.routeSettings,
317-
anchorPoint: cupertino?.anchorPoint,
331+
anchorPoint: cupertino?.anchorPoint ?? anchorPoint,
332+
requestFocus: cupertino?.requestFocus ?? requestFocus,
318333
);
319334
}
320335
}

lib/src/platform_alert_dialog.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ import 'platform.dart';
1313
import 'platform_provider.dart';
1414
import 'widget_base.dart';
1515

16-
const EdgeInsets _defaultInsetPadding =
17-
EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0);
16+
const EdgeInsets _defaultInsetPadding = EdgeInsets.symmetric(
17+
horizontal: 40.0,
18+
vertical: 24.0,
19+
);
1820

1921
abstract class _BaseData {
20-
_BaseData({
21-
this.widgetKey,
22-
this.actions,
23-
this.content,
24-
this.title,
25-
});
22+
_BaseData({this.widgetKey, this.actions, this.content, this.title});
2623

2724
final Key? widgetKey;
2825
final List<Widget>? actions;
@@ -183,7 +180,9 @@ class PlatformAlertDialog extends PlatformWidgetBase<Widget, AlertDialog> {
183180

184181
// Ensure that there is Material widget at the root page level
185182
// as there can be Material widgets used on ios
186-
return result.withMaterial(useLegacyMaterial &&
187-
context.findAncestorWidgetOfExactType<Material>() == null);
183+
return result.withMaterial(
184+
useLegacyMaterial &&
185+
context.findAncestorWidgetOfExactType<Material>() == null,
186+
);
188187
}
189188
}

lib/src/platform_app_bar.dart

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class MaterialAppBarData extends _BaseData {
7777
this.clipBehavior,
7878
this.forceMaterialTransparency,
7979
this.actionsPadding,
80+
this.useDefaultSemanticsOrder,
8081
});
8182

8283
final List<Widget>? actions;
@@ -104,6 +105,7 @@ class MaterialAppBarData extends _BaseData {
104105
final Clip? clipBehavior;
105106
final bool? forceMaterialTransparency;
106107
final EdgeInsetsGeometry? actionsPadding;
108+
final bool? useDefaultSemanticsOrder;
107109
}
108110

109111
class CupertinoNavigationBarData extends _BaseData {
@@ -209,6 +211,7 @@ class PlatformAppBar
209211
clipBehavior: data?.clipBehavior,
210212
forceMaterialTransparency: data?.forceMaterialTransparency ?? false,
211213
actionsPadding: data?.actionsPadding,
214+
useDefaultSemanticsOrder: data?.useDefaultSemanticsOrder ?? true,
212215
);
213216
}
214217

@@ -226,7 +229,8 @@ class PlatformAppBar
226229

227230
final providerState = PlatformProvider.of(context);
228231
final noMaterialParent = data?.noMaterialParent ?? false;
229-
final useMaterial = (!noMaterialParent) &&
232+
final useMaterial =
233+
(!noMaterialParent) &&
230234
(providerState?.settings.iosUsesMaterialWidgets ?? false);
231235

232236
final heroTag = data?.heroTag;
@@ -235,16 +239,18 @@ class PlatformAppBar
235239
key: data?.widgetKey ?? widgetKey,
236240
middle: _getMiddleCupertinoWidget(context, data),
237241
backgroundColor: data?.backgroundColor ?? backgroundColor,
238-
automaticallyImplyLeading: data?.automaticallyImplyLeading ??
242+
automaticallyImplyLeading:
243+
data?.automaticallyImplyLeading ??
239244
automaticallyImplyLeading ??
240245
true,
241246
automaticallyImplyMiddle: data?.automaticallyImplyMiddle ?? true,
242247
previousPageTitle: data?.previousPageTitle,
243248
padding: data?.padding,
244249
border: data?.border ?? _kDefaultNavBarBorder,
245-
leading: _getLeadingCupertinoWidget(context, data)
246-
?.withMaterial(useMaterial)
247-
.withWidgetFinder<CupertinoNavigationBar>(),
250+
leading: _getLeadingCupertinoWidget(
251+
context,
252+
data,
253+
)?.withMaterial(useMaterial).withWidgetFinder<CupertinoNavigationBar>(),
248254
trailing: (data?.trailing ?? trailing)
249255
?.withMaterial(useMaterial)
250256
.withWidgetFinder<CupertinoNavigationBar>(),
@@ -268,9 +274,10 @@ class PlatformAppBar
268274
previousPageTitle: data?.previousPageTitle,
269275
padding: data?.padding,
270276
border: data?.border ?? _kDefaultNavBarBorder,
271-
leading: _getLeadingCupertinoWidget(context, data)
272-
?.withMaterial(useMaterial)
273-
.withWidgetFinder<CupertinoNavigationBar>(),
277+
leading: _getLeadingCupertinoWidget(
278+
context,
279+
data,
280+
)?.withMaterial(useMaterial).withWidgetFinder<CupertinoNavigationBar>(),
274281
trailing: (data?.trailing ?? trailing)
275282
?.withMaterial(useMaterial)
276283
.withWidgetFinder<CupertinoNavigationBar>(),
@@ -329,9 +336,10 @@ class PlatformAppBar
329336
return null;
330337
}
331338

332-
final useMediaQueryWrapper = PlatformProvider.of(context)
333-
?.settings
334-
.wrapCupertinoAppBarMiddleWithMediaQuery ??
339+
final useMediaQueryWrapper =
340+
PlatformProvider.of(
341+
context,
342+
)?.settings.wrapCupertinoAppBarMiddleWithMediaQuery ??
335343
true;
336344

337345
if (!useMediaQueryWrapper) {

lib/src/platform_checkbox.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class MaterialCheckboxData extends _BaseData {
6262
super.mouseCursor,
6363
super.fillColor,
6464
super.semanticLabel,
65-
//Material
6665

66+
//Material
6767
this.hoverColor,
6868
this.overlayColor,
6969
this.splashRadius,
@@ -182,9 +182,6 @@ class PlatformCheckbox extends PlatformWidgetBase<CupertinoCheckbox, Checkbox> {
182182
final tristate = data?.tristate ?? this.tristate;
183183
assert(tristate || value != null);
184184
return CupertinoCheckbox(
185-
//Cupertino
186-
// inactiveColor: Deprecated
187-
//Common
188185
key: data?.widgetKey ?? widgetKey,
189186
value: value,
190187
tristate: tristate,
@@ -199,6 +196,7 @@ class PlatformCheckbox extends PlatformWidgetBase<CupertinoCheckbox, Checkbox> {
199196
fillColor: data?.fillColor ?? fillColor,
200197
mouseCursor: data?.mouseCursor ?? mouseCursor,
201198
semanticLabel: data?.semanticLabel ?? semanticLabel,
199+
// inactiveColor: , Deprecated
202200
);
203201
}
204202
}

0 commit comments

Comments
 (0)