- 20 Sep, 2023 1 commit
-
-
Greg Spencer authored
## Description This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values. This PR removes them from the material library. This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some. In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow. This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases. I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these). ## Related PRs - https://github.com/flutter/flutter/pull/134984 - https://github.com/flutter/flutter/pull/134992 - https://github.com/flutter/flutter/pull/134993 - https://github.com/flutter/flutter/pull/134994 ## Tests - Documentation only change.
-
- 14 Sep, 2023 1 commit
-
-
- 13 Sep, 2023 1 commit
-
-
Polina Cherkasova authored
-
- 09 Sep, 2023 1 commit
-
-
- 23 Aug, 2023 1 commit
-
-
Michael Goderbauer authored
Blocking issue (https://github.com/dart-lang/linter/issues/453) for this lint has been resolved.
-
- 17 Aug, 2023 1 commit
-
-
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.
-
- 24 Jul, 2023 1 commit
-
-
Lexycon authored
This PR changes the material date picker behavior when changing the year so that it matches the native picker and the material component guideline. (#81547) See material component guideline for the date picker: [Material component date-picker behavior](https://m3.material.io/components/date-pickers/guidelines#1531a81f-4052-4a75-a20d-228c7e110156) See also: [Material components android discussion](https://github.com/material-components/material-components-android/issues/1723) When selecting another year in the native picker, the same day will be selected (by respecting the boundaries of the date picker). The current material date picker does not select any day when changing the year. This will lead to confusion if the user presses OK and the year does not get updated. So here is my suggestion: It will try to preselect the day like the native picker: - respecting the boundaries of the date picker (firstDate, lastDate) - changing from leapyear 29th february will set 28th february if not a leapyear is selected - only set the day if it is selectable (selectableDayPredicate) The calendar shown in the recording was setup with this parameters: ``` firstDate: DateTime(2016, DateTime.june, 9), initialDate: DateTime(2018, DateTime.may, 4), lastDate: DateTime(2021, DateTime.january, 15), ``` https://github.com/flutter/flutter/assets/13588771/3041c296-b9d0-4078-88cd-d1135fc343b3 Fixes #81547
-
- 17 Jul, 2023 1 commit
-
-
Taha Tesser authored
Fix `DatePicker` uses incorrect overlay color from `DatePickerTheme` and add missing tests (#130584) fixes [YearPickerState in calendar_date_picker is using dayOverlayColor instead of yearOverlayColor](https://github.com/flutter/flutter/issues/130051) ### Description - Fix year selection uses incorrect overlay color from `DatePickerTheme` - Update defaults tests to check for overlay color for different modes - Add tests to check overlay color is resolved. ### 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( theme: ThemeData( datePickerTheme: const DatePickerThemeData( yearOverlayColor: MaterialStatePropertyAll<Color>(Colors.green), dayOverlayColor: MaterialStatePropertyAll<Color>(Colors.amber), ), useMaterial3: true, ), home: Directionality( textDirection: TextDirection.ltr, child: Material( child: Center( child: DatePickerDialog( initialDate: DateTime(2023, DateTime.january, 25), firstDate: DateTime(2022), lastDate: DateTime(2024, DateTime.december, 31), currentDate: DateTime(2023, DateTime.january, 24), ), ), ), ), ); } } ``` </details> ```dart yearOverlayColor: MaterialStatePropertyAll<Color>(Colors.green), dayOverlayColor: MaterialStatePropertyAll<Color>(Colors.red), ``` ### Before ![Screenshot 2023-07-14 at 18 39 51](https://github.com/flutter/flutter/assets/48603081/52ec5096-bad6-4753-9e9a-15b6d5ce767e) ### After ![Screenshot 2023-07-14 at 18 38 32](https://github.com/flutter/flutter/assets/48603081/a51aeca8-a5c2-42b4-8c05-b55f9955e860)
-
- 15 Jun, 2023 1 commit
-
-
Qun Cheng authored
Fixes #127863 This PR is to set `Semantics.button` to true for date widget in `DatePicker`. https://github.com/flutter/flutter/assets/36861262/b366f25a-6bf3-4e3f-b944-ab71197b73e5
-
- 22 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-
- 31 Jan, 2023 1 commit
-
-
Hans Muller authored
-
- 24 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes
-
- 07 Dec, 2022 1 commit
-
-
harperl-lgtm authored
* Date picker special labeling for currentDate with localization and tests. * Updated CalendarDatePicker semantics test * removed recursive import * changed labeling for current date to be less verbose
-
- 28 Nov, 2022 1 commit
-
-
Jonathan Goyvaerts authored
Fixes flutter/flutter#113277
-
- 31 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 22 Aug, 2022 1 commit
-
-
Kate Lovett authored
-
- 10 Aug, 2022 1 commit
-
-
Ian Hickson authored
-
- 25 May, 2022 1 commit
-
-
Pierre-Louis authored
* Use `curly_braces_in_flow_control_structures` for `material` * include test/material * add back removed comments
-
- 27 Apr, 2022 1 commit
-
-
Pierre-Louis authored
-
- 14 Apr, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 03 Feb, 2022 1 commit
-
-
Ian Hickson authored
-
- 20 Jan, 2022 1 commit
-
-
Darren Austin authored
-
- 13 Jan, 2022 1 commit
-
-
Darren Austin authored
-
- 08 Oct, 2021 3 commits
-
-
Ian Hickson authored
-
Zachary Anderson authored
This reverts commit 5fd259be.
-
Ian Hickson authored
-
- 15 Jul, 2021 1 commit
-
- 14 Jul, 2021 3 commits
-
-
Ian Hickson authored
-
Zachary Anderson authored
This reverts commit 31de052e.
-
Ian Hickson authored
-
- 13 Jul, 2021 2 commits
-
-
Ian Hickson authored
This reverts commit e2490f29.
-
Ian Hickson authored
-
- 10 May, 2021 1 commit
-
-
Michael Goderbauer authored
-
- 26 Apr, 2021 1 commit
-
-
Tong Mu authored
Applies #78522 to existing code, by replacing all occurrences of LogicalKeySet to SingleActivator or ShortcutActivator.
-
- 03 Apr, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 31 Mar, 2021 2 commits
-
-
Alexandre Ardhuin authored
-
Alexandre Ardhuin authored
-
- 11 Mar, 2021 1 commit
-
-
Michael Debertol authored
-
- 04 Mar, 2021 1 commit
-
-
Greg Spencer authored
-
- 27 Jan, 2021 1 commit
-
-
Sam Rawlins authored
-