Flutter Material3 showTimePicker issues with time selector container size. Does anyone know how to resize the container to get full-text size? Overriding the theme does the trick overriding material3 theme. But I need the timepicker to use localization since without one it won't be able to use the current AppLocalization and default to another language.
onShowPicker: (context, currentValue) async {
final time = await showTimePicker(
builder: (context, child) {
// return Theme(
// data: ThemeData.light(),
// child: Container(
// child: child));
return Localizations.override(
context: context,
locale: _locale,
child: child,
);
},
// builder: (context, child) {
// return Column(
// children: <Widget>[
// Padding(
// padding: const EdgeInsets.only(top: 0),
// child: Container(
// // height: screenHeight / 1.1,
// child: child,
// ),
// ),
// ],
// );
// },
context: context,
initialTime: TimeOfDay.fromDateTime(
currentValue ?? DateTime.now()),
);