I want to use the Flutter timepicker in 12 hour format with AM/PM selector, but Flutter only shows me the 24 hours format.
I want to get this format:

But flutter only shows me this format:

This is my code:
_selectTime(BuildContext context) async {
TimeOfDay picked = await showTimePicker(
context: context,
initialTime: TimeOfDay(hour: 12, minute: 00),
builder: (BuildContext context, Widget child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: false),
child: child,
);
},
);
}
