Commit d7b092e
authored
Fix
Fixes [Defining inputDecorationTheme in TimePickerThemeData Causes Misalignment of Hour and Minute Input Boxes](flutter/flutter#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">TimePicker hour and minute inputs are resized on error (#154008)1 parent b2de4df commit d7b092e
4 files changed
Lines changed: 99 additions & 4 deletions
File tree
- dev/tools/gen_defaults/lib
- packages/flutter
- lib/src/material
- test/material
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2047 | 2047 | | |
2048 | 2048 | | |
2049 | 2049 | | |
2050 | | - | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
2051 | 2058 | | |
2052 | 2059 | | |
2053 | 2060 | | |
| |||
3341 | 3348 | | |
3342 | 3349 | | |
3343 | 3350 | | |
3344 | | - | |
| 3351 | + | |
3345 | 3352 | | |
3346 | 3353 | | |
3347 | 3354 | | |
| |||
3676 | 3683 | | |
3677 | 3684 | | |
3678 | 3685 | | |
3679 | | - | |
| 3686 | + | |
3680 | 3687 | | |
3681 | 3688 | | |
3682 | 3689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
2013 | 2021 | | |
2014 | 2022 | | |
2015 | 2023 | | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
2016 | 2061 | | |
2017 | 2062 | | |
2018 | 2063 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
861 | 897 | | |
862 | 898 | | |
863 | 899 | | |
| |||
970 | 1006 | | |
971 | 1007 | | |
972 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
0 commit comments