1. 21 Feb, 2024 2 commits
    • Taha Tesser's avatar
      `CalendarDatePicker` doesn't announce selected date on desktop (#143583) · 5d2353c1
      Taha Tesser authored
      fixes [Screen reader is not announcing the selected date as selected on DatePicker](https://github.com/flutter/flutter/issues/143439)
      
      ### Descriptions
      - This fixes an issue where `CalendarDatePicker` doesn't announce selected date on desktop.
      - Add semantic label to describe the selected date is indeed "Selected".
      
      ### 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 const MaterialApp(
            home: MyHomePage(title: 'Flutter Demo Home Page'),
          );
        }
      }
      
      class MyHomePage extends StatefulWidget {
        const MyHomePage({super.key, required this.title});
      
        final String title;
      
        @override
        MyHomePageState createState() => MyHomePageState();
      }
      
      class MyHomePageState extends State<MyHomePage> {
        void _showDatePicker() async {
          await showDatePicker(
            context: context,
            initialDate: DateTime.now(),
            firstDate: DateTime(1900),
            lastDate: DateTime(2200),
          );
        }
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            appBar: AppBar(
              title: Text(widget.title,
                  style: const TextStyle(fontFamily: 'ProductSans')),
            ),
            body: const Center(
              child: Text('Click the button to show date picker.'),
            ),
            floatingActionButton: FloatingActionButton(
              onPressed: _showDatePicker,
              tooltip: 'Show date picker',
              child: const Icon(Icons.edit_calendar),
            ),
          );
        }
      }
      
      // 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,
      //       home: Scaffold(
      //         body: Center(
      //           child: CalendarDatePicker(
      //             initialDate: DateTime.now(),
      //             firstDate: DateTime(2020),
      //             lastDate: DateTime(2050),
      //             onDateChanged: (date) {
      //               print(date);
      //             },
      //           ),
      //         ),
      //       ),
      //     );
      //   }
      // }
      ```
      
      </details>
      
      ### Before
      
      https://github.com/flutter/flutter/assets/48603081/c82e1f15-f067-4865-8a5a-1f3c0c8d91da
      
      ### After
      
      https://github.com/flutter/flutter/assets/48603081/193d9e26-df9e-4d89-97ce-265c3d564607
      5d2353c1
    • Taha Tesser's avatar
      Add `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle` for... · 95cdebed
      Taha Tesser authored
      Add `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle`  for Material 3 Time Picker (#143739)
      
      fixes [`Time selector separator` in TimePicker is not centered vertically](https://github.com/flutter/flutter/issues/143691)
      
      Separator currently `hourMinuteTextStyle` to style itself.
      
      This introduces `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle` from Material 3 specs to correctly style  the separator. This also adds ability to change separator color without changing `hourMinuteTextColor`.
      
      ### Specs for the time selector separator
      https://m3.material.io/components/time-pickers/specs
      ![image](https://github.com/flutter/flutter/assets/48603081/0c84f649-545d-441b-adbf-2b9ec872b14c)
      
      ### Code sample
      
      <details>
      <summary>expand to view the code sample</summary> 
      
      ```dart
      import 'package:flutter/material.dart';
      
      void main() {
        runApp(const App());
      }
      
      class App extends StatelessWidget {
        const App({super.key});
      
        @override
        Widget build(BuildContext context) {
          return MaterialApp(
            theme: ThemeData(
              // timePickerTheme: TimePickerThemeData(
              //   hourMinuteTextColor: Colors.amber,
              // )
            ),
            home: Scaffold(
              body: Center(
                child: Builder(builder: (context) {
                  return ElevatedButton(
                    onPressed: () async {
                      await showTimePicker(
                        context: context,
                        initialTime: TimeOfDay.now(),
                      );
                    },
                    child: const Text('Pick Time'),
                  );
                }),
              ),
            ),
          );
        }
      }
      
      ```
      
      </details>
      
      | Before | After |
      | --------------- | --------------- |
      | <img src="https://github.com/flutter/flutter/assets/48603081/20beeba4-5cc2-49ee-bba8-1c552c0d1e44" /> | <img src="https://github.com/flutter/flutter/assets/48603081/24927187-aff7-4191-930c-bceab6a4b4c2" /> |
      95cdebed
  2. 25 Jan, 2024 1 commit
  3. 01 Dec, 2023 1 commit
  4. 17 Oct, 2023 1 commit
  5. 10 Oct, 2023 1 commit
  6. 14 Jul, 2023 1 commit
  7. 13 Jul, 2023 1 commit
  8. 09 Jun, 2023 1 commit
  9. 20 Apr, 2023 1 commit
  10. 11 Apr, 2023 1 commit
    • Tae Hyung Kim's avatar
      Fix gen_date_localizations script and regenerate (#124547) · c0c5901c
      Tae Hyung Kim authored
      Internal bug: b/256596915
      
      Turns out we need to regenerate date localizations in order for the
      `intl` package to be setup properly within Flutter. This PR fixes the
      script (since it assumes the use of the old `.packages` way of handling
      packages), and regenerates the `generated_date_localizations.dart` file.
      c0c5901c
  11. 10 Apr, 2023 1 commit
  12. 04 Apr, 2023 1 commit
  13. 14 Mar, 2023 1 commit
  14. 10 Mar, 2023 1 commit
    • Casey Hillers's avatar
      Revert PRs relating to single window assumption (#122369) · 1f426123
      Casey Hillers authored
      * Revert "Remove references to BindingBase.window (#122119)"
      
      This reverts commit c7681f00.
      
      * Revert "Remove another reference to BindingBase.window (#122341)"
      
      This reverts commit 6ec44450.
      
      * Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233)"
      
      This reverts commit eb3d317e.
      
      * Revert "Remove single view assumption from TestViewConfiguration (#122352)"
      
      This reverts commit 927289fb.
      
      * Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325)"
      
      This reverts commit 67e17e45.
      
      * Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327)"
      
      This reverts commit c2a5111c.
      
      * Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347)"
      
      This reverts commit 28b65e08.
      
      * Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321)"
      
      This reverts commit 01367d52.
      1f426123
  15. 09 Mar, 2023 1 commit
  16. 28 Feb, 2023 1 commit
  17. 27 Feb, 2023 1 commit
  18. 11 Jan, 2023 1 commit
  19. 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
  20. 25 Jul, 2022 1 commit
  21. 03 May, 2022 1 commit
  22. 08 Apr, 2022 1 commit
  23. 30 Mar, 2022 1 commit
  24. 01 Dec, 2021 1 commit
  25. 03 Nov, 2021 1 commit
  26. 08 Oct, 2021 3 commits
  27. 01 Oct, 2021 1 commit
  28. 16 Jun, 2021 1 commit
  29. 14 Jun, 2021 1 commit
  30. 22 Apr, 2021 1 commit
  31. 16 Apr, 2021 1 commit
  32. 20 Feb, 2021 1 commit
  33. 02 Feb, 2021 1 commit
  34. 26 Jan, 2021 1 commit
  35. 12 Nov, 2020 1 commit
  36. 12 Oct, 2020 1 commit
  37. 19 Aug, 2020 1 commit