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 
This commit is contained in:
@@ -737,6 +737,7 @@ md.comp.time-picker.period-selector.selected.label-text.color,
|
||||
md.comp.time-picker.period-selector.selected.pressed.label-text.color,
|
||||
md.comp.time-picker.period-selector.unselected.focus.label-text.color,
|
||||
md.comp.time-picker.period-selector.unselected.hover.label-text.color,
|
||||
md.comp.time-picker.period-selector.unselected.label-text.color,
|
||||
md.comp.time-picker.period-selector.unselected.pressed.label-text.color,
|
||||
md.comp.time-picker.period-selector.vertical.container.height,
|
||||
md.comp.time-picker.period-selector.vertical.container.width,
|
||||
@@ -746,7 +747,6 @@ md.comp.time-picker.time-selector.container.shape,
|
||||
md.comp.time-picker.time-selector.container.width,
|
||||
md.comp.time-picker.time-selector.focus.state-layer.opacity,
|
||||
md.comp.time-picker.time-selector.hover.state-layer.opacity,
|
||||
md.comp.time-picker.time-selector.label-text.text-style,
|
||||
md.comp.time-picker.time-selector.selected.container.color,
|
||||
md.comp.time-picker.time-selector.selected.focus.label-text.color,
|
||||
md.comp.time-picker.time-selector.selected.focus.state-layer.color,
|
||||
|
||||
|
Reference in New Issue
Block a user