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-17 17:56:07 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-04-27 09:28:11 +02:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-07-17 17:56:07 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2022-09-29 09:12:05 -07:00
2023-06-09 11:28:18 +00:00
2023-01-12 14:22:53 +00:00
2023-02-24 06:30:33 -08:00
2023-06-09 11:28:18 +00:00
2023-07-17 17:56:07 +00:00
2023-06-09 11:28:18 +00:00
2023-07-17 17:56:07 +00:00
2023-06-09 11:28:18 +00:00
2023-06-12 14:52:06 +00:00
2023-03-13 16:16:07 +00:00
2023-07-19 22:07:59 +02:00
2023-06-09 11:28:18 +00:00
2023-06-30 08:58:14 +00:00
2023-06-09 11:28:18 +00:00
2023-03-13 16:16:07 +00:00
2023-06-09 11:28:18 +00:00
2022-09-20 14:09:20 -07:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-22 22:34:06 +00:00
2023-06-09 11:28:18 +00:00
2023-03-17 10:09:49 -07:00
2023-07-28 14:11:23 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00