Taha Tesser
7d89617a92
Fix TimePicker defaults for hourMinuteTextStyle and dayPeriodTextColor for Material 3 (#131253)
fixes [`TimePicker` color and visual issues](https://github.com/flutter/flutter/issues/127035)
## Description
- fixes default text style for `TimePicker`s `hourMinuteTextStyle` and added a todo for https://github.com/flutter/flutter/issues/131247
- fixes correct default color not being accessed for `dayPeriodTextColor`
- Updates tests
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(useMaterial3: true),
home: const Example(),
);
}
}
class Example extends StatelessWidget {
const Example({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Sample'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
showTimePicker(
context: context,
orientation: Orientation.portrait,
initialEntryMode: TimePickerEntryMode.input,
initialTime: TimeOfDay.now(),
builder: (BuildContext context, Widget? child) {
return MediaQuery(
data: MediaQuery.of(context)
.copyWith(alwaysUse24HourFormat: true),
child: child!,
);
},
);
},
child: const Text('Open Time Picker'),
),
),
);
}
}
```
</details>
### Before

### After

2023-07-28 14:11:23 +00:00
..
2023-07-27 09:57:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-06 08:51:06 -07:00
2023-07-22 06:45:27 -07:00
2023-07-18 16:24:11 +00:00
2023-07-18 16:24:11 +00:00
2023-07-22 06:45:27 -07:00
2023-07-18 16:13:48 +00:00
2023-07-20 16:34:43 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-25 22:56:49 +00:00
2023-07-25 22:56:49 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-25 18:24:43 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-24 16:03:05 +00:00
2023-07-22 06:45:27 -07:00
2023-07-13 22:41:57 +00:00
2023-07-22 06:45:27 -07:00
2023-07-12 22:27:37 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-25 15:37:17 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-27 09:57:27 -07:00
2023-07-17 08:08:51 +00:00
2023-07-17 12:48:58 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-17 15:16:58 +00:00
2023-07-12 17:25:20 +00:00
2023-07-12 17:25:20 +00:00
2023-07-22 06:45:27 -07:00
2023-07-13 22:41:57 +00:00
2023-07-22 06:45:27 -07:00
2023-07-24 18:15:53 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-14 10:14:04 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-26 22:46:20 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-26 22:46:20 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-17 23:35:20 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-26 22:46:20 +00:00
2023-07-26 03:07:27 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-14 10:14:04 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-21 10:38:54 +00:00
2023-07-22 06:45:27 -07:00
2023-07-13 22:41:57 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-26 22:46:20 +00:00
2023-07-22 06:45:27 -07:00
2023-07-14 10:14:04 -07:00
2023-07-19 22:48:40 +00:00
2023-07-22 06:45:27 -07:00
2023-07-26 22:46:20 +00:00
2023-07-12 15:47:51 +00:00
2023-07-14 10:14:04 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-14 10:14:04 -07:00
2023-06-22 17:00:58 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-06-22 21:20:41 +00:00
2023-07-22 06:45:27 -07:00
2023-07-13 10:41:16 -07:00
2023-07-22 06:45:27 -07:00
2023-07-14 10:14:04 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-06-22 21:20:40 +00:00
2023-07-22 06:45:27 -07:00
2023-07-26 13:31:29 +00:00
2023-07-17 08:07:10 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-17 08:07:10 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-14 21:12:24 +00:00
2023-07-22 06:45:27 -07:00
2023-07-14 21:12:24 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-20 01:01:01 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-20 16:34:46 +00:00
2023-07-20 16:34:46 +00:00
2023-07-27 09:57:27 -07:00
2023-07-28 14:11:23 +00:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00
2023-07-22 06:45:27 -07:00