Skip to content

Commit 5269fcd

Browse files
support flutter 3.10 minimum dart3 (#426)
1 parent a77d86f commit 5269fcd

File tree

9 files changed

+124
-115
lines changed

9 files changed

+124
-115
lines changed

example/lib/pages/fields_page.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ const countries = [
352352
var actionResults = [
353353
SearchResultItem(
354354
'Build project',
355-
child: Row(
356-
children: const [
355+
child: const Row(
356+
children: [
357357
Padding(
358358
padding: EdgeInsets.symmetric(horizontal: 8.0),
359359
child: MacosIcon(CupertinoIcons.hammer),
@@ -365,8 +365,8 @@ var actionResults = [
365365
),
366366
SearchResultItem(
367367
'Debug project',
368-
child: Row(
369-
children: const [
368+
child: const Row(
369+
children: [
370370
Padding(
371371
padding: EdgeInsets.symmetric(horizontal: 8.0),
372372
child: MacosIcon(CupertinoIcons.tickets),
@@ -378,8 +378,8 @@ var actionResults = [
378378
),
379379
SearchResultItem(
380380
'Open containing folder',
381-
child: Row(
382-
children: const [
381+
child: const Row(
382+
children: [
383383
Padding(
384384
padding: EdgeInsets.symmetric(horizontal: 8.0),
385385
child: MacosIcon(CupertinoIcons.folder),

example/lib/pages/toolbar_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ class _ToolbarPageState extends State<ToolbarPage> {
160160
return SingleChildScrollView(
161161
controller: scrollController,
162162
padding: const EdgeInsets.all(30),
163-
child: Center(
163+
child: const Center(
164164
child: Column(
165-
children: const [
165+
children: [
166166
Text(
167167
'A toolbar provides convenient access to frequently used commands and controls that perform actions relevant to the current view.',
168168
textAlign: TextAlign.center,

example/pubspec.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
8+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.10.0"
11+
version: "2.11.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
24+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.2.1"
27+
version: "1.3.0"
2828
clock:
2929
dependency: transitive
3030
description:
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
40+
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.17.0"
43+
version: "1.17.1"
4444
cupertino_icons:
4545
dependency: "direct main"
4646
description:
@@ -79,18 +79,18 @@ packages:
7979
dependency: transitive
8080
description:
8181
name: js
82-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
82+
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
8383
url: "https://pub.dev"
8484
source: hosted
85-
version: "0.6.5"
85+
version: "0.6.7"
8686
lints:
8787
dependency: transitive
8888
description:
8989
name: lints
90-
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
90+
sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015"
9191
url: "https://pub.dev"
9292
source: hosted
93-
version: "2.0.1"
93+
version: "2.1.0"
9494
macos_ui:
9595
dependency: "direct main"
9696
description:
@@ -110,10 +110,10 @@ packages:
110110
dependency: transitive
111111
description:
112112
name: matcher
113-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
113+
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
114114
url: "https://pub.dev"
115115
source: hosted
116-
version: "0.12.13"
116+
version: "0.12.15"
117117
material_color_utilities:
118118
dependency: transitive
119119
description:
@@ -126,10 +126,10 @@ packages:
126126
dependency: transitive
127127
description:
128128
name: meta
129-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
129+
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
130130
url: "https://pub.dev"
131131
source: hosted
132-
version: "1.8.0"
132+
version: "1.9.1"
133133
nested:
134134
dependency: transitive
135135
description:
@@ -142,10 +142,10 @@ packages:
142142
dependency: transitive
143143
description:
144144
name: path
145-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
145+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
146146
url: "https://pub.dev"
147147
source: hosted
148-
version: "1.8.2"
148+
version: "1.8.3"
149149
provider:
150150
dependency: "direct main"
151151
description:
@@ -203,10 +203,10 @@ packages:
203203
dependency: transitive
204204
description:
205205
name: test_api
206-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
206+
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
207207
url: "https://pub.dev"
208208
source: hosted
209-
version: "0.4.16"
209+
version: "0.5.1"
210210
vector_math:
211211
dependency: transitive
212212
description:
@@ -216,5 +216,5 @@ packages:
216216
source: hosted
217217
version: "2.1.4"
218218
sdks:
219-
dart: ">=2.18.5 <3.0.0"
220-
flutter: ">=3.7.0"
219+
dart: ">=3.0.0 <4.0.0"
220+
flutter: ">=3.10.0"

lib/src/fields/text_field.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class _TextFieldSelectionGestureDetectorBuilder
105105
final _MacosTextFieldState _state;
106106

107107
@override
108-
void onSingleTapUp(TapUpDetails details) {
108+
void onSingleTapUp(TapDragUpDetails details) {
109109
// Because TextSelectionGestureDetector listens to taps that happen on
110110
// widgets in front of it, tapping the clear button will also trigger
111111
// this handler. If the clear button widget recognizes the up event,
@@ -124,11 +124,14 @@ class _TextFieldSelectionGestureDetectorBuilder
124124
}
125125
_state._requestKeyboard();
126126
if (_state.widget.onTap != null) _state.widget.onTap!();
127+
128+
super.onSingleTapUp(details);
127129
}
128130

129131
@override
130-
void onDragSelectionEnd(DragEndDetails details) {
132+
void onDragSelectionEnd(TapDragEndDetails details) {
131133
_state._requestKeyboard();
134+
super.onDragSelectionEnd(details);
132135
}
133136
}
134137

lib/src/layout/scaffold.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class _MacosScaffoldState extends State<MacosScaffold> {
113113
}
114114

115115
class _ScaffoldBody extends MultiChildRenderObjectWidget {
116-
_ScaffoldBody({
116+
const _ScaffoldBody({
117117
super.children,
118118
});
119119

0 commit comments

Comments
 (0)