Skip to content

Instantly share code, notes, and snippets.

@shyvum
Last active June 5, 2020 16:44
Show Gist options
  • Save shyvum/a9c940d27e1f7e9f3ab00d11a4694576 to your computer and use it in GitHub Desktop.
Save shyvum/a9c940d27e1f7e9f3ab00d11a4694576 to your computer and use it in GitHub Desktop.
FlatButton(
onPressed: () {
DatePicker.showDatePicker(context,
showTitleActions: true,
minTime: DateTime(2000, 1, 1),
maxTime: DateTime(2022, 12, 31),
onChanged: (date) {print('change $date');},
onConfirm: (date) {print('confirm $date');},
currentTime: DateTime.now(), locale: LocaleType.en);},
child: Text('Show DateTime Picker',)
);
@zielu92
Copy link

zielu92 commented Jun 5, 2020

missing "," on 5th line

@shyvum
Copy link
Author

shyvum commented Jun 5, 2020

Thanks @zielu92 for pointing out. It's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment