I have created an application in flutter for linux desktop and web. There is a showTimePicker for a form i used and it works fine in the desktop app and it returns the time in 24 hr format but when i run it in a browser the time picker changes to a 12 hr format.
Is there a setting that i need to change on my google chrome browser?
TimeOfDay _fltEndTime = TimeOfDay.now();
final TimeOfDay? newTime = await showTimePicker(context: context,
initialTime: _fltEndTime,builder: (BuildContext context, Widget?
child) {
return MediaQuery(
data:
MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true),
child: child!,
);
},
);
if (newTime != null) {
setState(() {
fltEndTime = newTime;
});
}