fix: Date picker field now has unique key so new field has new value

This commit is contained in:
Bugfix Jacques 2023-05-25 10:39:37 +02:00
parent dd7129a6b9
commit efda4bb9b2
2 changed files with 2 additions and 2 deletions

View file

@ -157,7 +157,7 @@ class _DateInputFieldState extends State<DateTimeInputField> {
autovalidateMode: widget.autovalidateMode, autovalidateMode: widget.autovalidateMode,
keyboardType: TextInputType.none, keyboardType: TextInputType.none,
readOnly: true, readOnly: true,
key: Key(currentValue.toString()), key: UniqueKey(),
initialValue: currentValue.isEmpty ? widget.initialValue : currentValue, initialValue: currentValue.isEmpty ? widget.initialValue : currentValue,
onSaved: (value) => widget.onSaved?.call(value), onSaved: (value) => widget.onSaved?.call(value),
onTap: () async { onTap: () async {

View file

@ -1,6 +1,6 @@
name: flutter_input_library name: flutter_input_library
description: A new Flutter package project. description: A new Flutter package project.
version: 2.1.0 version: 2.1.1
repository: https://github.com/Iconica-Development/flutter_input_library repository: https://github.com/Iconica-Development/flutter_input_library
environment: environment: