Updating readme.md

This commit is contained in:
Gaspard Merten 2020-07-19 16:53:45 +02:00
parent c836bc8329
commit e48bd4e0d5
3 changed files with 11 additions and 10 deletions

View file

@ -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:
<img src='https://raw.githubusercontent.com/GaspardMerten/date_field/master/example/example.png' height='150px'></img>
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:
<i>onSaved, validator, initialValue, autovalidate, enabled, firstDate, lastDate, label, dateFormat, decoration, initialDatePickerMode</i>
<i>onSaved, validator, initialValue, autovalidate, enabled, firstDate, lastDate, label, dateFormat, decoration, initialDatePickerMode, mode (time, date, time and date)</i>
<img src='https://raw.githubusercontent.com/GaspardMerten/date_field/master/example/example.png' height='150px'></img>
If you want more details, I invite you to check the official documentation.

View file

@ -30,7 +30,6 @@ class _HomeWidgetState extends State<HomeWidget> {
Column(
children: <Widget>[
DateTimeField(
selectedDate: selectedDate,
onDateSelected: (DateTime date) {
setState(() {

View file

@ -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: