You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@
3
3
In an application, the date range picker can be displayed in a dialog window by using the `onPressed` event of the button.
4
4
5
5
## Step 1:
6
-
To host a date range picker in a pop-up, you can use the 'AlertDialog' window to achieve this add the date range picker inside the alert dialog and open the dialog on the 'onpressed' event of a button. Here, a flat button is used.
6
+
To host a date range picker in a pop-up, you can use the 'AlertDialog' window to achieve this add the date range picker inside the alert dialog and open the dialog on the 'onpressed' event of a button. Here, a material button is used.
7
7
8
8
```xml
9
9
body: Column(
10
10
mainAxisAlignment: MainAxisAlignment.center,
11
11
crossAxisAlignment: CrossAxisAlignment.stretch,
12
12
children: <Widget>[
13
-
FlatButton(
13
+
MaterialButton(
14
14
child: Container(
15
15
child: _selectedDate ==null
16
-
? Text('Select a date'):Text(_selectedDate),
16
+
? Text('Select a date'):Text(_selectedDate!),
17
17
),
18
18
onPressed: () {
19
19
showDialog(
@@ -26,7 +26,7 @@ body: Column(
26
26
child: Column(
27
27
children: <Widget>[
28
28
getDateRangePicker(),
29
-
FlatButton(
29
+
MaterialButton(
30
30
child: Text("OK"),
31
31
onPressed: () {
32
32
Navigator.pop(context);
@@ -61,7 +61,7 @@ Using the `onSelectionChanged` event, you can show the selected date of the pick
0 commit comments