Skip to content

Commit db78cd5

Browse files
the-best-is-bestyuanhoujun
authored andcommitted
support flutter 3.10 minimum dart3 (macosui#426)
1 parent 3e78c92 commit db78cd5

File tree

9 files changed

+149
-140
lines changed

9 files changed

+149
-140
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: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,56 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
9-
url: "https://pub.dev"
8+
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9+
url: "https://pub.flutter-io.cn"
1010
source: hosted
11-
version: "2.10.0"
11+
version: "2.11.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
1616
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17-
url: "https://pub.dev"
17+
url: "https://pub.flutter-io.cn"
1818
source: hosted
1919
version: "2.1.1"
2020
characters:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
25-
url: "https://pub.dev"
24+
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25+
url: "https://pub.flutter-io.cn"
2626
source: hosted
27-
version: "1.2.1"
27+
version: "1.3.0"
2828
clock:
2929
dependency: transitive
3030
description:
3131
name: clock
3232
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33-
url: "https://pub.dev"
33+
url: "https://pub.flutter-io.cn"
3434
source: hosted
3535
version: "1.1.1"
3636
collection:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
41-
url: "https://pub.dev"
40+
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
41+
url: "https://pub.flutter-io.cn"
4242
source: hosted
43-
version: "1.17.0"
43+
version: "1.17.1"
4444
cupertino_icons:
4545
dependency: "direct main"
4646
description:
4747
name: cupertino_icons
4848
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
49-
url: "https://pub.dev"
49+
url: "https://pub.flutter-io.cn"
5050
source: hosted
5151
version: "1.0.5"
5252
fake_async:
5353
dependency: transitive
5454
description:
5555
name: fake_async
5656
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
57-
url: "https://pub.dev"
57+
url: "https://pub.flutter-io.cn"
5858
source: hosted
5959
version: "1.3.1"
6060
flutter:
@@ -66,10 +66,10 @@ packages:
6666
dependency: "direct dev"
6767
description:
6868
name: flutter_lints
69-
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
70-
url: "https://pub.dev"
69+
sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
70+
url: "https://pub.flutter-io.cn"
7171
source: hosted
72-
version: "2.0.1"
72+
version: "2.0.2"
7373
flutter_test:
7474
dependency: "direct dev"
7575
description: flutter
@@ -79,18 +79,18 @@ packages:
7979
dependency: transitive
8080
description:
8181
name: js
82-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
83-
url: "https://pub.dev"
82+
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
83+
url: "https://pub.flutter-io.cn"
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"
91-
url: "https://pub.dev"
90+
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
91+
url: "https://pub.flutter-io.cn"
9292
source: hosted
93-
version: "2.0.1"
93+
version: "2.1.1"
9494
macos_ui:
9595
dependency: "direct main"
9696
description:
@@ -102,48 +102,48 @@ packages:
102102
dependency: transitive
103103
description:
104104
name: matcher
105-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
106-
url: "https://pub.dev"
105+
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
106+
url: "https://pub.flutter-io.cn"
107107
source: hosted
108-
version: "0.12.13"
108+
version: "0.12.15"
109109
material_color_utilities:
110110
dependency: transitive
111111
description:
112112
name: material_color_utilities
113113
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
114-
url: "https://pub.dev"
114+
url: "https://pub.flutter-io.cn"
115115
source: hosted
116116
version: "0.2.0"
117117
meta:
118118
dependency: transitive
119119
description:
120120
name: meta
121-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
122-
url: "https://pub.dev"
121+
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
122+
url: "https://pub.flutter-io.cn"
123123
source: hosted
124-
version: "1.8.0"
124+
version: "1.9.1"
125125
nested:
126126
dependency: transitive
127127
description:
128128
name: nested
129129
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
130-
url: "https://pub.dev"
130+
url: "https://pub.flutter-io.cn"
131131
source: hosted
132132
version: "1.0.0"
133133
path:
134134
dependency: transitive
135135
description:
136136
name: path
137-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
138-
url: "https://pub.dev"
137+
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
138+
url: "https://pub.flutter-io.cn"
139139
source: hosted
140-
version: "1.8.2"
140+
version: "1.8.3"
141141
provider:
142142
dependency: "direct main"
143143
description:
144144
name: provider
145145
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
146-
url: "https://pub.dev"
146+
url: "https://pub.flutter-io.cn"
147147
source: hosted
148148
version: "6.0.5"
149149
sky_engine:
@@ -156,57 +156,57 @@ packages:
156156
description:
157157
name: source_span
158158
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
159-
url: "https://pub.dev"
159+
url: "https://pub.flutter-io.cn"
160160
source: hosted
161161
version: "1.9.1"
162162
stack_trace:
163163
dependency: transitive
164164
description:
165165
name: stack_trace
166166
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
167-
url: "https://pub.dev"
167+
url: "https://pub.flutter-io.cn"
168168
source: hosted
169169
version: "1.11.0"
170170
stream_channel:
171171
dependency: transitive
172172
description:
173173
name: stream_channel
174174
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
175-
url: "https://pub.dev"
175+
url: "https://pub.flutter-io.cn"
176176
source: hosted
177177
version: "2.1.1"
178178
string_scanner:
179179
dependency: transitive
180180
description:
181181
name: string_scanner
182182
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
183-
url: "https://pub.dev"
183+
url: "https://pub.flutter-io.cn"
184184
source: hosted
185185
version: "1.2.0"
186186
term_glyph:
187187
dependency: transitive
188188
description:
189189
name: term_glyph
190190
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
191-
url: "https://pub.dev"
191+
url: "https://pub.flutter-io.cn"
192192
source: hosted
193193
version: "1.2.1"
194194
test_api:
195195
dependency: transitive
196196
description:
197197
name: test_api
198-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
199-
url: "https://pub.dev"
198+
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
199+
url: "https://pub.flutter-io.cn"
200200
source: hosted
201-
version: "0.4.16"
201+
version: "0.5.1"
202202
vector_math:
203203
dependency: transitive
204204
description:
205205
name: vector_math
206206
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
207-
url: "https://pub.dev"
207+
url: "https://pub.flutter-io.cn"
208208
source: hosted
209209
version: "2.1.4"
210210
sdks:
211-
dart: ">=2.18.0 <3.0.0"
212-
flutter: ">=1.20.0"
211+
dart: ">=3.0.0 <4.0.0"
212+
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
@@ -115,7 +115,7 @@ class _MacosScaffoldState extends State<MacosScaffold> {
115115
}
116116

117117
class _ScaffoldBody extends MultiChildRenderObjectWidget {
118-
_ScaffoldBody({
118+
const _ScaffoldBody({
119119
super.children,
120120
});
121121

0 commit comments

Comments
 (0)