1. 05 Sep, 2023 1 commit
  2. 30 Aug, 2023 1 commit
    • Taha Tesser's avatar
      Fix `cancelButtonStyle` & `confirmButtonStyle` properties from... · d7a3a682
      Taha Tesser authored
      Fix `cancelButtonStyle` & `confirmButtonStyle` properties  from `TimePickerTheme`  aren't working (#132843)
      
      fixes [`TimePickerThemeData` action buttons styles aren't working](https://github.com/flutter/flutter/issues/132760)
      
      ### 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,
              timePickerTheme: TimePickerThemeData(
                cancelButtonStyle: TextButton.styleFrom(
                  shape: const RoundedRectangleBorder(
                    borderRadius: BorderRadius.all(Radius.circular(4)),
                    side: BorderSide(color: Colors.red),
                  ),
                  backgroundColor: Colors.white,
                  foregroundColor: Colors.red,
                  elevation: 3,
                  shadowColor: Colors.red,
                ),
                confirmButtonStyle: TextButton.styleFrom(
                  shape: const RoundedRectangleBorder(
                    borderRadius: BorderRadius.all(Radius.circular(4)),
                  ),
                  backgroundColor: Colors.green[700],
                  foregroundColor: Colors.white,
                  elevation: 3,
                  shadowColor: Colors.green[700],
                ),
              ),
            ),
            home: const Example(),
          );
        }
      }
      
      class Example extends StatelessWidget {
        const Example({super.key});
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: Center(
              child: TimePickerDialog(initialTime: TimeOfDay.now()),
            ),
          );
        }
      }
      
      ``` 
      
      </details>
      
      ### Before (action buttons don't use the style from the `TimePickerTheme`)
      
      ![Screenshot 2023-08-18 at 14 57 37](https://github.com/flutter/flutter/assets/48603081/c95160e2-76a2-4bb5-84e0-3731fce19c0b)
      
      ### After (action buttons use the style from the `TimePickerTheme`)
      
      ![Screenshot 2023-08-18 at 14 57 18](https://github.com/flutter/flutter/assets/48603081/422d348a-bee2-4696-8d9a-5fce56191aaa)
      d7a3a682
  3. 07 Aug, 2023 1 commit
  4. 28 Jul, 2023 1 commit
    • Taha Tesser's avatar
      Fix `TimePicker` defaults for `hourMinuteTextStyle` and `dayPeriodTextColor`... · 7d89617a
      Taha Tesser authored
      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
      
      ![ezgif com-video-to-gif](https://github.com/flutter/flutter/assets/48603081/b791501f-aed3-44f3-8f75-70a1e28038c6)
      
      ### After
      
      ![ezgif com-video-to-gif (1)](https://github.com/flutter/flutter/assets/48603081/1bb32064-a9b1-416d-8290-7d22b0d4fdb9)
      7d89617a
  5. 24 Jul, 2023 1 commit
  6. 20 Jul, 2023 1 commit
  7. 13 Jun, 2023 1 commit
  8. 16 Feb, 2023 1 commit
  9. 15 Dec, 2022 1 commit
  10. 14 Dec, 2022 1 commit
    • Greg Spencer's avatar
      Convert TimePicker to Material 3 (#116396) · fae458b9
      Greg Spencer authored
      * Make some minor changes in preparation for updating the Time Picker to M3
      
      * Revert OutlineInputBorder.borderRadius type change
      
      * Revert more OutlineInputBorder.borderRadius changes.
      
      * Convert TimePicker to Material 3
      
      * Add example test
      
      * Revert OutlineInputBorder.borderRadius type change
      
      * Fix test
      
      * Review Changes
      
      * Merge changes
      
      * Some sizing and elevation fixes
      
      * Fix localization tests
      fae458b9
  11. 25 Aug, 2022 1 commit
  12. 22 Aug, 2022 1 commit
  13. 21 Aug, 2022 1 commit
  14. 19 Aug, 2022 1 commit
  15. 16 Aug, 2022 1 commit
  16. 15 Aug, 2022 1 commit
  17. 14 Apr, 2022 1 commit
  18. 23 Jun, 2021 1 commit
  19. 28 Apr, 2021 1 commit
  20. 01 Apr, 2021 1 commit
  21. 04 Mar, 2021 1 commit
  22. 04 Feb, 2021 1 commit
  23. 09 Oct, 2020 1 commit
  24. 04 Aug, 2020 1 commit
  25. 28 Jul, 2020 1 commit
  26. 08 Jul, 2020 1 commit
  27. 26 Jun, 2020 1 commit
  28. 23 Jun, 2020 2 commits