Fixing issue #29,adding 24h format support for material time picker dialog

This commit is contained in:
Gaspard Merten 2022-04-28 23:02:33 +02:00
parent 6a7252ddc2
commit 546db9006a
3 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,7 @@
##3.0.1
* Fixing [issue #29](https://github.com/GaspardMerten/date_field/issues/29) -> adding 24h format support for material time picker dialog
##3.0.0
* Breaking Upgraded minimum Dart version to 2.15 for Constructor Tearoff support

View file

@ -185,6 +185,14 @@ class DateTimeField extends StatelessWidget {
return showTimePicker(
initialTime: TimeOfDay.fromDateTime(initialDateTime),
context: context,
builder: (BuildContext context, Widget? child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
alwaysUse24HourFormat: use24hFormat,
),
child: child!,
);
},
);
}

View file

@ -1,6 +1,6 @@
name: date_field
description: A widget in the form of a field that lets people choose a date, a time or both.
version: 3.0.0
version: 3.0.1
homepage: 'https://github.com/GaspardMerten/date_field'
environment: