182 Commits

Author SHA1 Message Date
Bruno Leroux
183b9ea27e
Add DropdownMenuFormField (#163721)
## Description

This PR introduces DropdownMenuFormField.

## Related Issue

Fixes [Create
DropdownMenuFormField](https://github.com/flutter/flutter/issues/141941)
Fixes [Add validator to
DropdownMenu](https://github.com/flutter/flutter/issues/152131)

## Tests

Adds 41 tests.
2025-05-02 19:41:10 +00:00
Kishan Rathore
b44f00cca6
Refactor: Move Slider and RangeSlider components to slider_parts.dart and range_slider_parts.dart (#165361)
Refactor: Move Slider and RangeSlider components to slider_parts.dart
and range_slider_parts.dart
fixes: #162510

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-04-29 20:35:13 +00:00
Kishan Rathore
ddc95409bd
Feat: Add carousel view theme (#164769)
Feat: Add carousel view theme
fixes: #159679 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-04-16 19:10:38 +00:00
Kishan Rathore
413fc7575f
Refactor: Move sliders value indicator shape to seperate file (#162858)
Refactor: Move sliders value indicator shape to seperate file
Part of: #162510 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-03-17 16:56:16 +00:00
Denis Gordin
31d6b35b7f
Move FlutterLogo from material to widget (#155864)
The PR is moving FlutterLogo from `lib/src/material` to `lib/src/widgets` because it has no dependency on Material.

Issue: https://github.com/flutter/flutter/issues/154448

PS: There is [older PR](https://github.com/flutter/flutter/pull/154711) for this issue and I don't know the policy on conflicting PRs. Let me know if I need to drop mine.
2024-09-30 17:19:25 +00:00
Qun Cheng
6e5f39b5d9
Create CarouselView widget - Part 1 (#148094)
This PR is to create an ["uncontained" Carousel](https://m3.material.io/components/carousel/specs#477de3a1-c9df-4742-baf3-bcd5eeb3764c).

https://github.com/flutter/flutter/assets/36861262/947e6b2c-219f-4c8b-aba1-4a1a010221a7

The rest of the layouts can be achieved by using `Carousel.weighted`: https://github.com/QuncCccccc/flutter/pull/2. The branch of `Caorusel.weighted` PR is based on this PR for relatively easer review. Will request reviews for the part 2 PR once this one is successfully merged in master.
2024-06-05 21:03:21 +00:00
Victor Sanni
f7012db828
Move Feedback to widgets layer (#148523)
Currently, `Feedback` exists in the Material layer. However, not only is
`Feedback` not material-opinionated, but it is an abstract class that
defines its functionality depending on the user's platform.

It makes sense that `Feedback` should exist in the widgets layer
instead. This makes it easier to incorporate platform specific
`Feedback` updates as they arrive, fixing issues like #148391.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-05-18 10:41:56 -07:00
Victor Sanni
7d92700042
Move toggleable to widget layer (#148272)
Currently, toggleable exists independently in the material and cupertino
libraries. Cupertino's toggleable is a minimal copy of material's, and
so it makes sense to have only one toggleable in the widgets layer.

This change makes it easier for cupertino's toggleables (switch, radio,
checkbox) to potentially have as many capabilities as material
toggleables (for example, resolving in different widget states), thus
increasing support for the cupertino library.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes

---------

Co-authored-by: Pierre-Louis <6655696+guidezpl@users.noreply.github.com>
2024-05-14 13:46:35 -07:00
maRci002
2079f34962
[WIP] Predictive back support for routes (#141373)
A new page transition, PredictiveBackPageTransitionsBuilder, which handles predictive back gestures on Android (where supported).
2024-03-27 16:43:10 -07:00
Pierre-Louis
0830a362d5
Add support for M3 motion (#129942)
## Description

This adds support for M3 easing and duration tokens.

This PR includes these changes:
* Generation of duration and easing constants, in `Durations` and
`Easing`, respectively (`Curves` is already taken in the `animation`
library)
* Add 3 Dart fixes

Once this is merged, I'll migrate packages/plugins/customers and then
uncomment the deprecation notices for the 3 M2 curves, all of which have
1:1 replacements.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/116525

## Tests
 - Added Dart fix tests

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-07-19 22:07:59 +02:00
Tsukuru Tanimichi
cc180e214e
Links in material library docs are outdated (#129891)
https://api.flutter.dev/flutter/material/material-library.html

Links in `material` library docs are outdated
2023-07-11 19:57:35 +00:00
Qun Cheng
0300cfa603
Create SearchAnchor and SearchViewTheme Widget (#123256) 2023-03-27 23:31:11 -07:00
Qun Cheng
5180e45080
Create SearchBar and SearchBarTheme (#122309) 2023-03-16 15:04:19 -07:00
Mushaheed Syed
7d85a585da
Add ActionButtonIconsData for overriding action icons (#118229)
* Add ActionButtonIconsData for overriding action icons

* Fix formatting issues

* Add missing exports in material library and add copyWith method in ActionButtonIconsData

* Move all action buttons, and icons to action_buttons.dart

* Rename actionButtonIcons to actionIconTheme

* Refactor buttons in action_buttons.dart to extend a private class for common implementation

* Refactor icons in action_buttons

* Fix docs in action_buttons_theme

* Fix #107646 always use 'Icons.arrow_back' as a back_button icon in web

* Update documentation for action buttons and add style parameter to every action button

* Fix analyzer warnings

* Add missing style argument in IconButton of _ActionButton

* Add tests for action buttons, action icon theme, drawer buttons, and back buttons

* Add example (+test) for action icon button's action icon theme in examples/api

* Fix analysis errors

* Add missing license header in action_icon_theme.0.dart

* Fix deprecation notice in theme_data.dart

* Update theme data tests for actionIconTheme

* Remove iconSize parameter from ActionButtons and update docs

* Fix failing tests

* Update button color during backbutton tests to red

* Fix analytics issues

* Fix format
2023-02-22 09:22:44 -08:00
Hans Muller
198a51ace9
Migrate the Material Date pickers to M3 Reprise (#119033) 2023-01-31 15:31:06 -08:00
Camille Simon
e0742ebb24
[Android] Add spell check suggestions toolbar (#114460)
* Add spell check suggestions toolbar

* Fix test and move menu

* Cleanup

* Cleanup and fix bug

* More cleanup

* Make height dynamic and use localized delete

* Begin adding tests

* Create var checking for results

* Add tests

* Fix analyze (sorta)

* Add back hideToolbar call for testing

* Add back hidetoolbar in ts and delete one in et

* Remove unecessary calls to hidToolbar

* Fix analyze and docs

* Test fix

* Fix container issue

* Clean up

* Fix analyze

* Move delegate

* Fix typos

* Start addressing review

* Continue addressing review

* Add assert

* Some refactoring

* Add test for button behavior

* Undo test change

* Make spell check results public

* Rearrange test

* Add comment

* Address review

* Finish addressing review

* remove unused imports

* Address nits

* Address review

* Fix formatting

* Refactor findsuggestionspanatcursorindex and textselectiontoolbar constraints

* Fix analyze:
2022-12-20 19:56:12 +00:00
Qun Cheng
8b86d238b4
Create DropdownMenu Widget to Support Material 3 (#116088)
* Created ComboBox

* Fixed failing tests

* Reverted the menu style tests change

* Addressed comments

* Updated documentation and rename foregroundColor variable

* Remamed ComboBox to DropdownMenu

* Removed a unused import

* Removed unused import

Co-authored-by: Qun Cheng <quncheng@google.com>
2022-11-29 22:36:35 +00:00
hangyu
0e57147db1
nav drawer (#115668) 2022-11-18 15:10:05 -08:00
Darren Austin
6ec2bd0a80
M3 Segmented Button widget (#113723) 2022-11-11 22:13:57 -08:00
Hans Muller
5a600456b0
Reland: Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560) (#115002)
Requires G3Fix cl/486997831
2022-11-10 11:05:50 -08:00
Hans Muller
d6a8e92cd6
Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (#114819)
This reverts commit a6da1042a819f7a93eb655d493db914561f93f83.
2022-11-07 08:50:56 -08:00
Hans Muller
a6da1042a8
Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560) 2022-11-06 17:21:08 -08:00
Justin McCandless
0b451b6dfd
Context Menus (#107193)
* Can show context menus anywhere in the app, not just on text.
* Unifies all desktop/mobile context menus to go through one class (ContextMenuController).
* All context menus are now just plain widgets that can be fully customized.
* Existing default context menus can be customized and reused.
2022-10-28 12:40:09 -07:00
Greg Spencer
8c271e5cb8
Implement Material MenuBar and MenuAnchor (#112239)
This implements a MenuBar widget that can render a Material menu bar, and a MenuAnchor widget used to create a cascading menu in a region. The menus are drawn in the overlay, while the menu bar itself is in the regular widget tree. Keyboard traversal works between the two.

This implementation of the MenuBar uses MenuAnchor to create a cascading menu that contains widgets representing the menu items. These menu items can be any kind of widget, but are typically SubmenuButtons that host submenus, or MenuItemButtons that have shortcut hints (but don't actually activate the shortcuts) and don't host submenus.

Cascading menus can be created outside of a MenuBar by using a MenuAnchor. They can be either given a specific location to appear (a coordinate), or they can be located by the MenuAnchor region that wraps the control that opens them.

The developer may also create a MenuController to pass to the various menu primitives (MenuBar or MenuAnchor) to associate menus so that they can be traversed together and closed together. Creating a controller is not required.
2022-09-28 14:10:18 -07:00
Darren Austin
5454bab6c1
Added support for M3 filled and filled tonal buttons. (#107382) 2022-08-25 11:36:03 -07:00
Qun Cheng
f7b0023439
Added IconButtonTheme and apply it to IconButton in M3 (#108332)
* Created IconButtonTheme and apply it to IconButton
2022-08-03 13:47:44 -07:00
Anthony Oleinik
f014c1e6dc
Loupe Android + iOS (#107477)
* added Magnifier for iOS and Android
2022-08-02 11:43:12 -07:00
Taha Tesser
76df7368b5
Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
Pierre-Louis
332c22f391
Update links to material library docs (#104392)
* Update links to `material` library docs

* outsmart bot heuristics
2022-05-26 08:56:35 +02:00
chunhtai
efb9368573
Supports global selection for all devices (#95226)
* Support global selection

* addressing comments

* add new test

* Addressing review comments

* update

* addressing comments

* addressing comments

* Addressing comments

* fix build
2022-05-24 13:53:55 -07:00
Taha Tesser
0f2b1a3baf
Refactor chip class and move independent chips into separate classes (#101507) 2022-04-12 07:24:11 -07:00
Kate Lovett
ff5e27f0fc
Remove deprecated FlatButton (#98545) 2022-04-11 16:22:47 -05:00
Kate Lovett
afe6c2e78d
Remove deprecated RaisedButton (#98547) 2022-04-06 11:26:25 -05:00
Taha Tesser
321ffa2ead
Move ListTileTheme and its tests into separate classes and add visualDensity to the ListTileTheme (#100622) 2022-03-23 13:29:30 -07:00
Anthony
bb2cca5f59
[Material] Create an InkSparkle splash effect that matches the Material 3 ripple effect (#99731)
Create an InkSparkle effect that matches the Material 3 ripple on Android 12. Similar to InkRipple, but uses the new custom shader API.
2022-03-09 18:13:46 -05:00
Kate Lovett
9240c9a02a
Remove deprecated OutlineButton (#98546) 2022-03-08 15:40:14 -08:00
Kate Lovett
cddd5524d4
Remove deprecated DayPicker and MonthPicker (#98543) 2022-02-22 18:19:15 -08:00
Taha Tesser
60f039cb1c
Add ExpansionTileTheme (#98405) 2022-02-15 08:44:33 -08:00
Markus Aksli
502edd48c9
Reland "Add TooltipVisibility widget" (#92090) 2021-10-19 12:26:33 -07:00
Markus Aksli
63a64a8875
Revert "Add TooltipVisibility widget (#91609)" (#92088)
This reverts commit 6b94f2f62a0d169c09d8b80c9f15ff245a98f67c.
2021-10-19 15:41:28 +03:00
Markus Aksli
6b94f2f62a
Add TooltipVisibility widget (#91609) 2021-10-19 04:53:04 -07:00
MH Johnson
f3049c7762
add navigation bar component (#83047) 2021-09-26 08:03:04 -07:00
Rami
069699ebde
Add ability to customize drawer shape and color as well as theme drawer properties (#89237) 2021-09-01 16:41:53 -04:00
Craig Labenz
02b46b0d77
refactor: Add MaterialStateMixin (#82843) 2021-06-10 11:44:04 -07:00
Darren Austin
e2ddeb0427
Added a ProgressIndicatorTheme. (#81075) 2021-04-26 12:27:37 -07:00
Hans Muller
51dd5bf1f7
Added ButtonStyle.splashFactory and NoSplash.splashFactory (#74949) 2021-02-01 18:11:04 -08:00
Justin McCandless
f3947ea0cd
Autocomplete (Material) (#73753)
* Material Autocomplete widget
2021-01-23 10:02:30 +08:00
Justin McCandless
a8471a61f8
Material Desktop Context Menu (#74286)
Very simple right-click context menu for Windows and Linux in a Material-esque style.
2021-01-20 16:29:01 -08:00
Kate Lovett
09008e6f71
Add ScrollbarTheme/ScrollbarThemeData (#72308) 2021-01-12 17:14:04 -08:00
Justin McCandless
7d2e3a1859
Material Text Selection Toolbar improvements (#69428)
Exposes the ability to create custom Material text selection toolbar menus, and cleans up the code around these menus.
2020-12-15 08:59:08 -08:00