mirror of
https://github.com/flutter/flutter.git
synced 2026-01-20 20:55:29 +08:00
Fixes [Defining inputDecorationTheme in TimePickerThemeData Causes Misalignment of Hour and Minute Input Boxes](https://github.com/flutter/flutter/issues/153549) ### 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( timePickerTheme: const TimePickerThemeData( inputDecorationTheme: InputDecorationTheme(), ), ), home: Scaffold( body: Center( child: Builder(builder: (BuildContext context) { return ElevatedButton( onPressed: () async { await showTimePicker( context: context, initialEntryMode: TimePickerEntryMode.input, initialTime: TimeOfDay.now(), ); }, child: const Text('Show Time Picker'), ); }), ), ), ); } } ``` </details> ### Before <img width="578" alt="Screenshot 2024-08-23 at 16 49 25" src="https://github.com/user-attachments/assets/f5da2495-551e-4110-85ea-120323cd38d2"> ### After <img width="578" alt="Screenshot 2024-08-23 at 16 51 03" src="https://github.com/user-attachments/assets/80224a10-e9d2-46d1-b2eb-f16358699744">