1. 15 Sep, 2023 1 commit
  2. 09 Sep, 2023 1 commit
  3. 02 Sep, 2023 1 commit
  4. 28 Aug, 2023 1 commit
    • Taha Tesser's avatar
      Fix `DatePickerDialog` & `DateRangePickerDialog` overflow when resized from... · a0943e65
      Taha Tesser authored
      Fix  `DatePickerDialog` & `DateRangePickerDialog` overflow when resized from landscape to portrait (#133327)
      
      fixes [resize window with a `showDateRangePicker` will make RenderFlex overflowed error](https://github.com/flutter/flutter/issues/131989)
      
      ### Description
      - This fixes  `DatePickerDialog` & `DateRangePickerDialog` overflow error when resized from landscape to portrait.
      - Added tests that check these two widgets from landscape to portrait for no overflow errors.
      
      <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(
            debugShowCheckedModeBanner: false,
            home: Example(),
          );
        }
      }
      
      class Example extends StatefulWidget {
        const Example({super.key});
      
        @override
        State<Example> createState() => _ExampleState();
      }
      
      class _ExampleState extends State<Example> {
        bool _portait = false;
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            appBar: AppBar(
              title: const Text('DatePicker & DateRangePicker'),
            ),
            body: MediaQuery(
              data: MediaQuery.of(context).copyWith(
                size: _portait ? const Size(400, 800) : const Size(800, 400),
              ),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  DatePickerDialog(
                    initialDate: DateTime.now(),
                    firstDate: DateTime(2020),
                    lastDate: DateTime(2030),
                    initialEntryMode: DatePickerEntryMode.inputOnly,
                  ),
                  DateRangePickerDialog(
                    currentDate: DateTime.now(),
                    firstDate: DateTime(2020),
                    lastDate: DateTime(2030),
                    initialEntryMode: DatePickerEntryMode.inputOnly,
                  ),
                ],
              ),
            ),
            floatingActionButton: FloatingActionButton(
              onPressed: () {
                setState(() {
                  _portait = !_portait;
                });
              },
              child: const Icon(Icons.refresh),
            ),
          );
        }
      }
      
      ```
      
      </details>
      
      ### Before
      
      https://github.com/flutter/flutter/assets/48603081/81387cbb-cdcf-42bd-b4f8-b7a08317c955
      
      ### After
      
      https://github.com/flutter/flutter/assets/48603081/36d28ea9-cfed-48ad-90f5-0459755e08c0
      a0943e65
  5. 17 Aug, 2023 1 commit
    • Ian Hickson's avatar
      Allow date pickers to not have selected date (#132343) · d19fb632
      Ian Hickson authored
      This enables our various date picker classes to have a null `initialDate`.
      
      It also fixes the logic of some of the widgets which used to do something when you _changed_ the `initial*` parameters, which is wrong for `initial*` properties (they by definition should only impact the initial state) and wrong for properties in general (behaviour should not change based on whether the widget was built with a new value or not, that violates the reactive design principles).
      
      Fixes https://github.com/flutter/flutter/issues/638.
      d19fb632
  6. 10 Aug, 2023 1 commit
  7. 07 Aug, 2023 1 commit
  8. 27 Jul, 2023 1 commit
  9. 25 Jul, 2023 2 commits
    • Loïc Sharma's avatar
      Revert "Proposal to add barrier configs for showDatePicker, showTimePicker and... · 300c5d82
      Loïc Sharma authored
      Revert "Proposal to add barrier configs for showDatePicker, showTimePicker and showAboutDialog." (#131278)
      
      Reverts flutter/flutter#130484. /cc @ronnnnn
      
      Example failure: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20framework_tests_libraries/12185/overview
      
      <details>
      <summary>Failure logs...</summary>
      
      ```
      04:51 +5379 ~18: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/material/about_test.dart: Barrier dismissible Barrier is dismissible with default parameter                                    
      ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
      The following TestFailure was thrown running a test:
      Expected: <1>
        Actual: <2>
      
      When the exception was thrown, this was the stack:
      #4      main.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/material/about_test.dart:776:7)
      <asynchronous suspension>
      #5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:165:15)
      <asynchronous suspension>
      #6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1008:5)
      <asynchronous suspension>
      <asynchronous suspension>
      (elided one frame from package:stack_trace)
      
      This was caught by the test expectation on the following line:
        file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/material/about_test.dart line 776
      The test description was:
        Barrier is dismissible with default parameter
      ════════════════════════════════════════════════════════════════════════════════════════════════════
      
      04:51 +5379 ~18 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/material/about_test.dart: Barrier dismissible Barrier is dismissible with default parameter [E]                             
        Test failed. See exception logs above.
        The test description was: Barrier is dismissible with default parameter
        
      To run this test again: /Volumes/Work/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin/dart test /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/material/about_test.dart -p vm --plain-name 'Barrier dismissible Barrier is dismissible with default parameter'
      ```
      
      </details>
      300c5d82
    • Seiya Kokushi's avatar
      Proposal to add barrier configs for showDatePicker, showTimePicker and showAboutDialog. (#130484) · 9def8f6b
      Seiya Kokushi authored
      ### Overview
      
      Add `barrierDismissible`, `barrierColor` and `barrierLabel` parameters to  `showDatePicker`, `showTimePicker` and `showAboutDialog` which calls `showDialog` internally.
      We can change these parameters with `showDialog` and Dialog widgets (like `DatePickerDialog`, `TimePickerDialog` or `AboutDialog`) directly. But, I think it is prefer to provide interfaces same as `showDialog` to keep application wide unified looks if it is used internally.
      
      Fixes #130971
      9def8f6b
  10. 24 Jul, 2023 1 commit
  11. 15 Jun, 2023 1 commit
  12. 13 Jun, 2023 1 commit
    • Qun Cheng's avatar
      Update unit tests in material library for Material 3 (#128725) · a5f8b64e
      Qun Cheng authored
      Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
      
      All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
      
      related to #127064
      a5f8b64e
  13. 30 May, 2023 1 commit
  14. 23 May, 2023 1 commit
  15. 12 May, 2023 1 commit
  16. 11 May, 2023 1 commit
    • Qun Cheng's avatar
      Reorder `materialStateProperty` defaults (#125905) · 4e7e4512
      Qun Cheng authored
      Fixes #122250. This PR is to make sure all the MaterialStateProperty defaults are able to correctly resolve different states. 
      * When a widget is pressed, it is also hovered, so we need to put the `MaterialState.pressed` check before `MaterialState.hovered`. 
      * When a widget is focused, the widget should still be able to be hovered, so we should check `MaterialState.hovered` before `MaterialState.focused`.
      * There are also cases like in _InputDecoratorDefaultsM3, the `MaterialState.disabled` should be checked before `MaterialState.error`.
      
       the order should be disabled, (error), pressed, hovered, focused.
      4e7e4512
  17. 24 Apr, 2023 1 commit
  18. 01 Apr, 2023 1 commit
  19. 15 Mar, 2023 1 commit
  20. 14 Mar, 2023 2 commits
  21. 03 Mar, 2023 1 commit
  22. 28 Feb, 2023 1 commit
  23. 02 Feb, 2023 1 commit
  24. 01 Feb, 2023 1 commit
  25. 18 Jan, 2023 1 commit
  26. 23 Dec, 2022 1 commit
  27. 20 Dec, 2022 1 commit
  28. 07 Dec, 2022 1 commit
  29. 15 Nov, 2022 1 commit
  30. 27 Apr, 2022 1 commit
  31. 21 Apr, 2022 1 commit
  32. 14 Apr, 2022 1 commit
  33. 08 Mar, 2022 1 commit
  34. 22 Feb, 2022 1 commit
  35. 08 Oct, 2021 3 commits
  36. 28 Apr, 2021 1 commit