GaspardMerten / date_field

Flutter DateField and DateFormField
Other
45 stars 32 forks source link

How do I size the Date Text size in the field? #5

Closed sitelligence closed 3 years ago

sitelligence commented 4 years ago

I have tried to use InputDecoration.

decoration: InputDecoration( labelStyle: TextStyle(fontSize: 20.0), hintStyle: TextStyle(fontSize: 20.0), ) This does not work, in fact if I include this code, the label no longer shows up. The only way make the label to show up is to not have a decoration equal to null.

This is the full definition.

DateTimeFormField( label: "Select Date", firstDate: _firstDate, lastDate: _lastDate, decoration: InputDecoration( labelStyle: TextStyle(fontSize: 20.0), hintStyle: TextStyle(fontSize: 20.0), ), mode: DateFieldPickerMode.date, initialValue: _selectedDate, initialDatePickerMode: DatePickerMode.day, onDateSelected: (value) { widget.service.setFormData(fld, DateFormat('yyyy-MM-dd').format(value)); setState(() { _selectedDate = value; }); }, );

GaspardMerten commented 4 years ago

You can now do it with the new version 0.3.1 or 0.3.2!