Skip to content

Commit a178f5e

Browse files
committed
FLUT-4313-Sample updated with null safety.
1 parent 39c4ec4 commit a178f5e

File tree

4 files changed

+48
-153
lines changed

4 files changed

+48
-153
lines changed

README.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,10 @@ class LocalizationInPicker extends StatefulWidget {
6969
_LocalizationInPickerState createState() => _LocalizationInPickerState();
7070
}
7171

72-
List<String> views = <String>['Month', 'Year', 'Decade', 'Century'];
73-
72+
7473
class _LocalizationInPickerState extends State<LocalizationInPicker> {
75-
DateRangePickerController _controller;
76-
77-
@override
78-
void initState() {
79-
// TODO: implement initState
80-
_controller = DateRangePickerController();
81-
super.initState();
82-
}
74+
final DateRangePickerController _controller = DateRangePickerController();
75+
final List<String> views = <String>['Month', 'Year', 'Decade', 'Century'];
8376

8477
@override
8578
Widget build(BuildContext context) {

lib/main.dart

+5-13
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Localization extends StatelessWidget {
2626
const Locale('ar'),
2727
],
2828
locale: const Locale('zh'),
29-
debugShowCheckedModeBanner: false ,
29+
debugShowCheckedModeBanner: false,
3030
home: LocalizationInPicker(),
3131
);
3232
}
@@ -37,17 +37,9 @@ class LocalizationInPicker extends StatefulWidget {
3737
_LocalizationInPickerState createState() => _LocalizationInPickerState();
3838
}
3939

40-
List<String> views = <String>['Month', 'Year', 'Decade', 'Century'];
41-
4240
class _LocalizationInPickerState extends State<LocalizationInPicker> {
43-
DateRangePickerController _controller;
44-
45-
@override
46-
void initState() {
47-
// TODO: implement initState
48-
_controller = DateRangePickerController();
49-
super.initState();
50-
}
41+
final DateRangePickerController _controller = DateRangePickerController();
42+
final List<String> views = <String>['Month', 'Year', 'Decade', 'Century'];
5143

5244
@override
5345
Widget build(BuildContext context) {
@@ -81,7 +73,7 @@ class _LocalizationInPickerState extends State<LocalizationInPicker> {
8173
view: DateRangePickerView.month,
8274
),
8375
)
84-
// This trailing comma makes auto-formatting nicer for build methods.
85-
);
76+
// This trailing comma makes auto-formatting nicer for build methods.
77+
);
8678
}
8779
}

pubspec.lock

+37-127
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,62 @@
11
# Generated by pub
22
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
4-
archive:
5-
dependency: transitive
6-
description:
7-
name: archive
8-
url: "https://pub.dartlang.org"
9-
source: hosted
10-
version: "2.0.11"
11-
args:
12-
dependency: transitive
13-
description:
14-
name: args
15-
url: "https://pub.dartlang.org"
16-
source: hosted
17-
version: "1.5.2"
184
async:
195
dependency: transitive
206
description:
217
name: async
228
url: "https://pub.dartlang.org"
239
source: hosted
24-
version: "2.4.0"
10+
version: "2.5.0"
2511
boolean_selector:
2612
dependency: transitive
2713
description:
2814
name: boolean_selector
2915
url: "https://pub.dartlang.org"
3016
source: hosted
31-
version: "1.0.5"
32-
charcode:
17+
version: "2.1.0"
18+
characters:
3319
dependency: transitive
3420
description:
35-
name: charcode
21+
name: characters
3622
url: "https://pub.dartlang.org"
3723
source: hosted
38-
version: "1.1.2"
39-
collection:
24+
version: "1.1.0"
25+
charcode:
4026
dependency: transitive
4127
description:
42-
name: collection
28+
name: charcode
4329
url: "https://pub.dartlang.org"
4430
source: hosted
45-
version: "1.14.11"
46-
convert:
31+
version: "1.2.0"
32+
clock:
4733
dependency: transitive
4834
description:
49-
name: convert
35+
name: clock
5036
url: "https://pub.dartlang.org"
5137
source: hosted
52-
version: "2.1.1"
53-
crypto:
38+
version: "1.1.0"
39+
collection:
5440
dependency: transitive
5541
description:
56-
name: crypto
42+
name: collection
5743
url: "https://pub.dartlang.org"
5844
source: hosted
59-
version: "2.1.3"
45+
version: "1.15.0"
6046
cupertino_icons:
6147
dependency: "direct main"
6248
description:
6349
name: cupertino_icons
6450
url: "https://pub.dartlang.org"
6551
source: hosted
66-
version: "0.1.3"
52+
version: "1.0.2"
53+
fake_async:
54+
dependency: transitive
55+
description:
56+
name: fake_async
57+
url: "https://pub.dartlang.org"
58+
source: hosted
59+
version: "1.2.0"
6760
flutter:
6861
dependency: "direct main"
6962
description: flutter
@@ -79,74 +72,34 @@ packages:
7972
description: flutter
8073
source: sdk
8174
version: "0.0.0"
82-
flutter_web_plugins:
83-
dependency: transitive
84-
description: flutter
85-
source: sdk
86-
version: "0.0.0"
87-
image:
88-
dependency: transitive
89-
description:
90-
name: image
91-
url: "https://pub.dartlang.org"
92-
source: hosted
93-
version: "2.1.4"
9475
intl:
9576
dependency: transitive
9677
description:
9778
name: intl
9879
url: "https://pub.dartlang.org"
9980
source: hosted
100-
version: "0.16.0"
81+
version: "0.17.0"
10182
matcher:
10283
dependency: transitive
10384
description:
10485
name: matcher
10586
url: "https://pub.dartlang.org"
10687
source: hosted
107-
version: "0.12.6"
88+
version: "0.12.10"
10889
meta:
10990
dependency: transitive
11091
description:
11192
name: meta
11293
url: "https://pub.dartlang.org"
11394
source: hosted
114-
version: "1.1.8"
95+
version: "1.3.0"
11596
path:
11697
dependency: transitive
11798
description:
11899
name: path
119100
url: "https://pub.dartlang.org"
120101
source: hosted
121-
version: "1.6.4"
122-
pedantic:
123-
dependency: transitive
124-
description:
125-
name: pedantic
126-
url: "https://pub.dartlang.org"
127-
source: hosted
128-
version: "1.8.0+1"
129-
petitparser:
130-
dependency: transitive
131-
description:
132-
name: petitparser
133-
url: "https://pub.dartlang.org"
134-
source: hosted
135-
version: "2.4.0"
136-
plugin_platform_interface:
137-
dependency: transitive
138-
description:
139-
name: plugin_platform_interface
140-
url: "https://pub.dartlang.org"
141-
source: hosted
142-
version: "1.0.2"
143-
quiver:
144-
dependency: transitive
145-
description:
146-
name: quiver
147-
url: "https://pub.dartlang.org"
148-
source: hosted
149-
version: "2.0.5"
102+
version: "1.8.0"
150103
sky_engine:
151104
dependency: transitive
152105
description: flutter
@@ -158,112 +111,69 @@ packages:
158111
name: source_span
159112
url: "https://pub.dartlang.org"
160113
source: hosted
161-
version: "1.5.5"
114+
version: "1.8.1"
162115
stack_trace:
163116
dependency: transitive
164117
description:
165118
name: stack_trace
166119
url: "https://pub.dartlang.org"
167120
source: hosted
168-
version: "1.9.3"
121+
version: "1.10.0"
169122
stream_channel:
170123
dependency: transitive
171124
description:
172125
name: stream_channel
173126
url: "https://pub.dartlang.org"
174127
source: hosted
175-
version: "2.0.0"
128+
version: "2.1.0"
176129
string_scanner:
177130
dependency: transitive
178131
description:
179132
name: string_scanner
180133
url: "https://pub.dartlang.org"
181134
source: hosted
182-
version: "1.0.5"
135+
version: "1.1.0"
183136
syncfusion_flutter_core:
184137
dependency: transitive
185138
description:
186139
name: syncfusion_flutter_core
187140
url: "https://pub.dartlang.org"
188141
source: hosted
189-
version: "18.1.36"
142+
version: "19.1.54+1"
190143
syncfusion_flutter_datepicker:
191144
dependency: "direct main"
192145
description:
193146
name: syncfusion_flutter_datepicker
194147
url: "https://pub.dartlang.org"
195148
source: hosted
196-
version: "18.1.36-beta"
149+
version: "19.1.54-beta.1"
197150
term_glyph:
198151
dependency: transitive
199152
description:
200153
name: term_glyph
201154
url: "https://pub.dartlang.org"
202155
source: hosted
203-
version: "1.1.0"
156+
version: "1.2.0"
204157
test_api:
205158
dependency: transitive
206159
description:
207160
name: test_api
208161
url: "https://pub.dartlang.org"
209162
source: hosted
210-
version: "0.2.11"
163+
version: "0.2.19"
211164
typed_data:
212165
dependency: transitive
213166
description:
214167
name: typed_data
215168
url: "https://pub.dartlang.org"
216169
source: hosted
217-
version: "1.1.6"
218-
url_launcher:
219-
dependency: transitive
220-
description:
221-
name: url_launcher
222-
url: "https://pub.dartlang.org"
223-
source: hosted
224-
version: "5.4.2"
225-
url_launcher_macos:
226-
dependency: transitive
227-
description:
228-
name: url_launcher_macos
229-
url: "https://pub.dartlang.org"
230-
source: hosted
231-
version: "0.0.1+4"
232-
url_launcher_platform_interface:
233-
dependency: transitive
234-
description:
235-
name: url_launcher_platform_interface
236-
url: "https://pub.dartlang.org"
237-
source: hosted
238-
version: "1.0.6"
239-
url_launcher_web:
240-
dependency: transitive
241-
description:
242-
name: url_launcher_web
243-
url: "https://pub.dartlang.org"
244-
source: hosted
245-
version: "0.1.1+1"
246-
utf:
247-
dependency: transitive
248-
description:
249-
name: utf
250-
url: "https://pub.dartlang.org"
251-
source: hosted
252-
version: "0.9.0+5"
170+
version: "1.3.0"
253171
vector_math:
254172
dependency: transitive
255173
description:
256174
name: vector_math
257175
url: "https://pub.dartlang.org"
258176
source: hosted
259-
version: "2.0.8"
260-
xml:
261-
dependency: transitive
262-
description:
263-
name: xml
264-
url: "https://pub.dartlang.org"
265-
source: hosted
266-
version: "3.5.0"
177+
version: "2.1.0"
267178
sdks:
268-
dart: ">=2.4.0 <3.0.0"
269-
flutter: ">=1.12.8 <2.0.0"
179+
dart: ">=2.12.0 <3.0.0"

pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ description: A new Flutter application.
1414
version: 1.0.0+1
1515

1616
environment:
17-
sdk: ">=2.1.0 <3.0.0"
17+
sdk: '>=2.12.0 <3.0.0'
1818

1919
dependencies:
2020
flutter:
2121
sdk: flutter
22-
syncfusion_flutter_datepicker: ^18.1.36-beta
22+
syncfusion_flutter_datepicker: ^19.1.54-beta.1
2323

2424
flutter_localizations:
2525
sdk: flutter
2626

2727
# The following adds the Cupertino Icons font to your application.
2828
# Use with the CupertinoIcons class for iOS style icons.
29-
cupertino_icons: ^0.1.2
29+
cupertino_icons: ^1.0.2
3030

3131
dev_dependencies:
3232
flutter_test:

0 commit comments

Comments
 (0)