From e48bd4e0d5874ec7464652550f2a217a980c4132 Mon Sep 17 00:00:00 2001 From: Gaspard Merten Date: Sun, 19 Jul 2020 16:53:45 +0200 Subject: [PATCH] Updating readme.md --- README.md | 18 ++++++++++-------- example/main.dart | 1 - pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 29788ad..ddbec4b 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,26 @@ # date_field -Contains DateField and DateFormField which allows the user to pick a DateTime from an input field! +Contains DateTimeField and DateTimeFormField which allows the user to pick a DateTime from an input field! Depending on +the mode, it can ask the user the time, the date or both at the same time! ## Getting Started -Just to let you know, this is how it looks like without any customization: - - The best way to discover this package is simply to check the example page! There are two widgets in this package: -- DateField -- DateFormField +- DateTimeField +- DateTimeFormField The second one is wrapping the first one with a FormField widget! This way you can integrate it in your form structure flawlessly. -The DateField widget returns an InputDecorator with an Inkwell which will display a date picker (*platform responsive*) which allows the user to select the date he wants! +The DateTimeField widget returns an InputDecorator with an Inkwell which will display a date picker (*platform responsive*) which allows the user to select the date and the time he wants! You can customize the widget a lot thanks to these parameters: -onSaved, validator, initialValue, autovalidate, enabled, firstDate, lastDate, label, dateFormat, decoration, initialDatePickerMode \ No newline at end of file +onSaved, validator, initialValue, autovalidate, enabled, firstDate, lastDate, label, dateFormat, decoration, initialDatePickerMode, mode (time, date, time and date) + + + +If you want more details, I invite you to check the official documentation. \ No newline at end of file diff --git a/example/main.dart b/example/main.dart index eb9e75f..5695e62 100644 --- a/example/main.dart +++ b/example/main.dart @@ -30,7 +30,6 @@ class _HomeWidgetState extends State { Column( children: [ DateTimeField( - selectedDate: selectedDate, onDateSelected: (DateTime date) { setState(() { diff --git a/pubspec.yaml b/pubspec.yaml index e35e903..7921919 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: date_field description: Contains DateField and DateFormField which allows the user to pick a DateTime from an input field! -version: 0.2.2 +version: 0.3.0 homepage: 'https://github.com/GaspardMerten/date_field' environment: