|
|
@@ -35,8 +35,10 @@ class HomePage extends StatelessWidget {
|
|
|
maxTime: DateTime(2019, 6, 7),
|
|
|
theme: DatePickerTheme(
|
|
|
backgroundColor: Colors.blue,
|
|
|
- itemStyle: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
- doneStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
|
|
+ itemStyle: TextStyle(
|
|
|
+ color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
+ doneStyle:
|
|
|
+ TextStyle(color: Colors.white, fontSize: 16)),
|
|
|
onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
@@ -49,7 +51,8 @@ class HomePage extends StatelessWidget {
|
|
|
)),
|
|
|
FlatButton(
|
|
|
onPressed: () {
|
|
|
- DatePicker.showTimePicker(context, showTitleActions: true, onChanged: (date) {
|
|
|
+ DatePicker.showTimePicker(context, showTitleActions: true,
|
|
|
+ onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
print('confirm $date');
|
|
|
@@ -61,11 +64,14 @@ class HomePage extends StatelessWidget {
|
|
|
)),
|
|
|
FlatButton(
|
|
|
onPressed: () {
|
|
|
- DatePicker.showDateTimePicker(context, showTitleActions: true, onChanged: (date) {
|
|
|
+ DatePicker.showDateTimePicker(context, showTitleActions: true,
|
|
|
+ onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
print('confirm $date');
|
|
|
- }, currentTime: DateTime(2008, 12, 31, 23, 12, 34), locale: LocaleType.zh);
|
|
|
+ },
|
|
|
+ currentTime: DateTime(2008, 12, 31, 23, 12, 34),
|
|
|
+ locale: LocaleType.zh);
|
|
|
},
|
|
|
child: Text(
|
|
|
'show date time picker (Chinese)',
|
|
|
@@ -73,7 +79,8 @@ class HomePage extends StatelessWidget {
|
|
|
)),
|
|
|
FlatButton(
|
|
|
onPressed: () {
|
|
|
- DatePicker.showDateTimePicker(context, showTitleActions: true, onChanged: (date) {
|
|
|
+ DatePicker.showDateTimePicker(context, showTitleActions: true,
|
|
|
+ onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
print('confirm $date');
|
|
|
@@ -85,11 +92,14 @@ class HomePage extends StatelessWidget {
|
|
|
)),
|
|
|
FlatButton(
|
|
|
onPressed: () {
|
|
|
- DatePicker.showDateTimePicker(context, showTitleActions: true, onChanged: (date) {
|
|
|
+ DatePicker.showDateTimePicker(context, showTitleActions: true,
|
|
|
+ onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
print('confirm $date');
|
|
|
- }, currentTime: DateTime(2008, 12, 31, 23, 12, 34), locale: LocaleType.nl);
|
|
|
+ },
|
|
|
+ currentTime: DateTime(2008, 12, 31, 23, 12, 34),
|
|
|
+ locale: LocaleType.nl);
|
|
|
},
|
|
|
child: Text(
|
|
|
'show date time picker (Dutch)',
|
|
|
@@ -97,11 +107,14 @@ class HomePage extends StatelessWidget {
|
|
|
)),
|
|
|
FlatButton(
|
|
|
onPressed: () {
|
|
|
- DatePicker.showDateTimePicker(context, showTitleActions: true, onChanged: (date) {
|
|
|
+ DatePicker.showDateTimePicker(context, showTitleActions: true,
|
|
|
+ onChanged: (date) {
|
|
|
print('change $date');
|
|
|
}, onConfirm: (date) {
|
|
|
print('confirm $date');
|
|
|
- }, currentTime: DateTime(2008, 12, 31, 23, 12, 34), locale: LocaleType.ru);
|
|
|
+ },
|
|
|
+ currentTime: DateTime(2008, 12, 31, 23, 12, 34),
|
|
|
+ locale: LocaleType.ru);
|
|
|
},
|
|
|
child: Text(
|
|
|
'show date time picker (Russian)',
|