Commit Graph

323 Commits

Author SHA1 Message Date
Justin McCandless
9d882983ff
Autocomplete async examples (#126283)
Added examples clarifying how to fetch Autocomplete options asynchronously.
2023-05-17 09:46:26 -07:00
Kate Lovett
27caa7fed9
Add ScrollController.onAttach & onDetach, samples/docs on listening/getting scrolling info (#124823)
This PR does a couple of things!

https://user-images.githubusercontent.com/16964204/231897483-416287f9-50ce-468d-a714-2a4bc0f2e011.mov

![Screenshot 2023-04-13 at 3 24 28 PM](https://user-images.githubusercontent.com/16964204/231897497-f5bee17d-43ed-46e5-acd7-e1bd64768274.png)

Fixes #20819 
Fixes #41910 
Fixes #121419

### Adds ScrollController.onAttach and ScrollController.onDetach

This resolves a long held pain point for developers. When using a scroll controller, there is not scroll position until the scrollable widget is built, and almost all methods of notification are only triggered when scrolling happens. Adding these two methods will help developers gain access to the scroll position when it is created. A common workaround for this was using a post frame callback to access controller.position after the first frame, but this is ripe for issues such as having multiple positions attached to the controller, or the scrollable no longer existing after that post frame callback. I think this can also be helpful for folks to debug cases when the scroll controller has multiple positions attached.

In particular, this also resolves this commented case: https://github.com/flutter/flutter/issues/20819#issuecomment-417784218
The isScrollingNotifier is hard for developers to access.

### Docs & samples

I was surprised we did not have samples on scroll notification or scroll controller, so I overhauled it and added a lot of docs on all the different ways to access scrolling information, when it is available and how they differ.
2023-05-15 21:01:06 +00:00
Taha Tesser
12659f2a7b
Fix MultiChildLayoutDelegate.hasChild doc (#126433)
fixes https://github.com/flutter/flutter/issues/115898

`hasChild` checks `_idToChild` map.  `_idToChild` is not assigned until `_callPerformLayout` is called.
So `hasChild` shouldn't be called in `getSize`.

df789c9e76/packages/flutter/lib/src/rendering/custom_layout.dart (L400-L404)

Updated docs and example class names.
2023-05-11 14:59:07 +00:00
Istiak Ahmed
042eaf6b90
Add sample code for SliverAppBar (#125785)
This PR adds an another example for SliverAppBar, showing the use of stretch and onStretchTrigger

https://user-images.githubusercontent.com/68919043/235420973-2bfb9871-9e05-4d87-9538-941d43178c76.mp4

Fixes #125651 

### Adds sample code for SliverAppBar [stretch, onStretchTrigger]

This PR adds an another simple and easily understandable example code for SliverAppBar.
2023-05-05 18:09:25 +00:00
Bruno Leroux
de2615462c
Add a ReorderableListView example with cards + cleanup existing tests (#126155)
## Description

This PR adds one `ReorderableListView` example to demonstrate how `proxyDecorator` can be used to animate cards elevation.

https://user-images.githubusercontent.com/840911/236468570-d2b33ab3-6b6d-4f8d-90de-778dcf1ad8ce.mp4

For motivation, see https://github.com/flutter/flutter/issues/124729#issuecomment-1521524190.

## Related Issue

Fixes https://github.com/flutter/flutter/issues/124729

## Tests

Adds 1 tests.

This PR also moves some misplaced example tests from `examples/api/test/reorderable_list` to `examples/api/test/material/reorderable_list` (and replaces two existing ones).
2023-05-05 16:39:11 +00:00
Tae Hyung Kim
1a0b03cb25
Sliver Cross Axis Group (#123862)
This widget implements the ability to place slivers side by side in a single ScrollView so that they scroll together. The design document for `SliverCrossAxisGroup` can be found [here](https://docs.google.com/document/d/1e2bdLSYV_Dq2h8aHpF8mda67aOmZocPiMyjCcTTZhTg/edit?resourcekey=0-Xj2X2XA3CAFae22Sv3hAiA).

Fixes #56756.
2023-04-28 23:41:58 +00:00
Tae Hyung Kim
482d1aaf13
Sliver Constrained Cross Axis (#125239)
Reimplements what we reverted here: #125233.
2023-04-24 23:17:36 +00:00
Tae Hyung Kim
9caabdd220
Revert "Sliver Constrained Cross Axis" (#125233)
Going to make some changes to the implementation so I'll revert in the meantime.

Reverts flutter/flutter#124337
2023-04-20 18:47:50 +00:00
Mitchell Goodwin
bd2617ecb9
Adaptive alert dialog (#124336)
Fixes #102811. Adds an adaptive constructor to AlertDialog, along with the adaptive function showAdaptiveDialog.

<img width="357" alt="Screenshot 2023-04-06 at 10 40 18 AM" src="https://user-images.githubusercontent.com/58190796/230455412-31100922-cfc5-4252-b8c6-6f076353f29e.png">
<img width="350" alt="Screenshot 2023-04-06 at 10 42 50 AM" src="https://user-images.githubusercontent.com/58190796/230455454-363dd37e-c44e-4aca-b6a0-cfa1d959f606.png">
2023-04-18 23:00:03 +00:00
Qun Cheng
6e85113418
Add an example for SearchBar (#124992)
This PR is to: 
* Update API doc for `SearchBar`.
* Add an example to show how to use a `SearchBar` as the builder of the `SearchAnchor`.
2023-04-17 23:23:57 +00:00
chunhtai
cc9ffd3f3b
SelectionContainer's listeners can remove itself during listener call… (#124624)
When swapping out delegate of  selectioncontainer, if the newly passed in delegate doesn't have any selectable content(which is usually the case), the selectioncontainerstate will notify all of the listeners. One of the listener would be SelectionRegistrant._updateSelectionRegistrarSubscription, and since it doesn't have content, it would remove itself from the listener which causes concurrent modification
2023-04-17 23:19:11 +00:00
Tae Hyung Kim
3c18f57480
Sliver Constrained Cross Axis (#124337)
Sliver Constrained Cross Axis
2023-04-10 21:15:48 +00:00
Ian Hickson
806c1f8186
Deprecate these old APIs (#116793)
Deprecate these old APIs
2023-04-06 19:53:50 +00:00
Loïc Sharma
6058e95919
Add CallbackShortcuts example (#123944)
Add CallbackShortcuts example
2023-04-05 22:17:59 +00:00
Greg Spencer
e3bc8efd39
Rename Sample classes (#124080)
Rename Sample classes
2023-04-04 20:34:29 +00:00
Kate Lovett
dd7d4b9521
Fix docs and error messages for scroll directions + sample code (#123819)
Fix docs and error messages for scroll directions + sample code
2023-03-31 23:46:59 +00:00
Mitchell Goodwin
84078c856f
Create CupertinoRadio Widget (#123296)
Create CupertinoRadio Widget
2023-03-30 15:43:36 +00:00
Vinny
f44064991d
Modified TextField docs - Replaced 'labelText' to 'hintText' in code snippet (#94128)
Modified TextField docs - Replaced 'labelText' to 'hintText' in code snippet
2023-03-29 20:02:33 +00:00
Simon Binder
c71f1dd76b
Treat hidden IndexedStack children as offstage for test finder (#123129)
Treat hidden `IndexedStack` children as offstage for test finder
2023-03-29 19:58:58 +00:00
Hans Muller
59c9d4e845
Added ExpansionTileController (#123298)
Added ExpansionTileController
2023-03-24 00:51:06 +00:00
Pierre-Louis
02d5c7595b
Add support for secondary tab bar (#122756)
Add support for secondary tab bar
2023-03-23 22:49:59 +00:00
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
Greg Spencer
bcdab118ba
Add support for application exit requests (#121378)
Add support for application exit requests
2023-03-17 15:35:55 +00:00
Bruno Leroux
3b4a882b61
Add one DefaultTextStyle example (#122182)
Add one DefaultTextStyle example
2023-03-08 20:40:54 +00:00
Bruno Leroux
a5ed960d0b
SystemUiOverlayStyle, add examples and improve documentation (#122187)
SystemUiOverlayStyle, add two examples and improve documentation
2023-03-08 20:31:59 +00:00
Bruno Leroux
961df985fa
Add ZoomPageTransitionsBuilder.allowSnapshotting (#122019)
Add ZoomPageTransitionsBuilder.allowSnapshotting
2023-03-06 22:43:00 +00:00
Bruno Leroux
a4ecd3e2f1
Cleanup PageTransitionsTheme documentation and add one example (#121701)
Cleanup PageTransitionsTheme documentation and add one example
2023-03-02 20:47:53 +00:00
LongCatIsLooong
e7ab3b07f8
OverlayPortal (#105335)
`OverlayPortal`
2023-03-02 17:34:01 +00:00
Taha Tesser
87679ff1c3
Update date picker examples, remove unused variables and add missing tests (#121528)
Update date picker examples, remove unused variables and add missing tests
2023-02-28 08:31:51 +00:00
Skandar Munir
681b72c304
fixes Show Week Day in CupertinoDatePicker with CupertinoDatePickerMo… (#120052)
fixes Show Week Day in CupertinoDatePicker with CupertinoDatePickerMo…
2023-02-28 01:52:51 +00:00
Taha Tesser
9a4e897965
Add OverflowBox example and update existing examples under basic.dart (#121213)
Add `OverflowBox` example and update existing examples under `basic.dart`
2023-02-27 18:52:00 +00:00
Taha Tesser
219ff64574
Reland "Update ExpansionTile to support Material 3 & add an example" (#121212) 2023-02-24 06:30:33 -08:00
Lioness100
26b6c1bedd
Fix typos (#121171)
* Fix typos

* lowercase animated & opacity

* Undo typo fix

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00: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
Ian Hickson
6205c110d6
Remove "note that" in our documentation (as per style guide) (#120842)
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
2023-02-17 22:27:33 +00:00
Hans Muller
42b20cf953
Added ListTile.titleAlignment, ListTileThemeData.titleAlignment (#119872)
* added ListTile.textAlignment

* changed titlesHeight to titleHeight

* fixed a typo

* Add tests and example

* Update tests

* update example test

---------

Co-authored-by: tahatesser <tessertaha@gmail.com>
2023-02-09 18:34:01 +00:00
Hans Muller
212bac80d1
Revert "Update ExpansionTile to support Material 3 & add an example (#119712)" (#120300)
This reverts commit e8eac0d047.
2023-02-08 10:53:55 -08:00
Taha Tesser
e8eac0d047
Update ExpansionTile to support Material 3 & add an example (#119712) 2023-02-07 08:21:18 -08:00
Justin McCandless
575ced6c5a
Fix context menu web examples (#120104)
The context menu examples on the docs site now work on the web.
2023-02-06 15:51:11 -08:00
Taha Tesser
bbca7ff693
Add Material 3 SwitchListTile example and update existing examples (#119714)
* Add Material 3 `SwitchListTile` example and update existing examples

* Update examples with `useMaterial3: true` and update example descriptions.

* add a `ColorScheme` colour
2023-02-06 09:02:37 +00:00
Taha Tesser
7177c413a9
Add Material 3 RadioListTile example and update existing examples (#119716)
* Add Material 3 `RadioListTile` example and update existing examples

* Update examples with `useMaterial3: true` and update example descriptions.

* add a `ColorScheme` colour
2023-02-03 16:27:43 +00:00
Jessica Pereira
9b86a4853e
Fix gets removedItem instead of its index (#119638)
* fix: gets removedItem instead of its index
add: sliver_animated_list.0_test.dart

* fix: sliver_animated_list.0_test.dart

* fix: pr comments

* fix test import

Co-authored-by: Taha Tesser <tessertaha@gmail.com>

---------

Co-authored-by: Taha Tesser <tessertaha@gmail.com>
2023-02-03 00:15:58 +00:00
Tanay Neotia
0e22aca785
Add support for image insertion on Android (#110052)
* Add support for image insertion on Android

* Fix checks

* Use proper Dart syntax on snippet

* Specify type annotation on list

* Fix nits, add some asserts, and improve example code

* Add missing import

* Fix nullsafety error

* Fix nullsafety error

* Remove reference to contentCommitMimeTypes in docs

* Fix nits

* Fix warnings and import

* Add test for content commit in editable_text_test.dart

* Check that URIs are equal in test

* Fix nits and rename functions / classes to be more self-explanatory

* Fix failing debugFillProperties tests

* Add empty implementation to `insertContent` in TextInputClient

* Tweak documentation slightly

* Improve docs for contentInsertionMimeTypes and fix assert

* Rework contentInsertionMimeType asserts

* Add test for onContentInserted example

* Switch implementation to a configuration class for more granularity in setting mime types

* Fix nits

* Improve docs and fix doc tests

* Fix more nits (LongCatIsLooong)

* Fix failing tests

* Make parameters (guaranteed by platform to be non-nullable) non-nullable

* Fix analysis issues
2023-01-31 19:46:18 +00:00
Taha Tesser
29ab437e28
Add Material 3 CheckboxListTile example and update existing examples (#118792)
* Add Material 3 `CheckboxListTile` example and update existing examples

* fix `list_tile.dart` doc issues

* Remove unnecessary comma
2023-01-25 13:21:18 +00:00
Taha Tesser
3e71e0caf4
Updated ListTile documentation, add Material 3 example and other ListTile examples fixes. (#118705) 2023-01-19 11:05:30 +00:00
Hans Muller
3a181e495a
Added LinearBorder, an OutlinedBorder like BoxBorder (#116940) 2023-01-13 08:04:22 -08:00
Taha Tesser
3d3f8e85a6
Update CupertinoPicker example (#118248)
* Update `CupertinoPicker` example

* format lines

* Revert making variable public

* revert variable change
2023-01-10 19:49:22 +00:00
Michael Goderbauer
81bc54be75
Enable use_colored_box lint (#117370) 2022-12-20 14:09:55 -08:00
Taha Tesser
f07db4018a
NavigationBar improvements (#116992) 2022-12-13 17:25:49 -08:00
Greg Spencer
fae458b925
Convert TimePicker to Material 3 (#116396)
* 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
2022-12-14 00:09:52 +00:00
ivirtex
ef40e3ea6f
Add CupertinoSliverNavigationBar large title magnification on over scroll (#110127)
* Add magnification of CupertinoSliverNavigationBar large title

* Fix padding in maximum scale computation

* Apply magnification by using RenderBox

* Do not pass key to the superclass constructor

* Use `clampDouble` instead of `clamp` extension method

* Remove trailing whitespaces to make linter happy

* Name test variables more precisely

* Move transform computation to `performLayout` and implement `hitTestChildren`

* Address comments

* Address comments

* Address comments

* Update comment about scale

* Fix hit-testing

* Fix hit-testing again

* Make linter happy

* Implement magnifying without using LayoutBuilder

* Remove trailing spaces

* Add hit-testing of the large title

* Remove whitespaces

* Fix scale computation and some tests

* Fix remaining tests

* Refactor and fix comments

* Update comments
2022-12-08 17:15:09 +00:00
Greg Spencer
fb9133b881
Add ListenableBuilder with examples (#116543)
* Add ListenableBuilder with examples

* Add tests

* Add tests

* Fix Test

* Change AnimatedBuilder to be a subclass of ListenableBuilder
2022-12-07 01:15:22 +00:00
Pierre-Louis
1e696d304c
Support theming CupertinoSwitchs (#116510)
* Introduce flag to maximally apply CupertinoTheme

* add missing docs

* add tests

* fix docs

* fix test
2022-12-06 15:32:58 +01:00
Taha Tesser
aaa4a52839
Add Material 3 Slider example (#115638)
* Add Material 3 `Slider` example

* Update doc

* Update test titles
2022-12-01 00:00:19 +00:00
Mitchell Goodwin
97195d1d51
Update CupertinoContextMenu to iOS 16 visuals (#110616)
* Update CupertinoContextMenu to iOS 16 visuals

* Revert some formatting

* Remove space

* Remove formatting changes, add more comments

* Added shadow effect

* Update context menu tests

* Remove white spaces

* Remove unused variable

* Refactor type checking logic

* Set default previewBuilder and update tests

* Check for border radius

* Remove trailing spaces

* Add builder to constructor

* Update previewBuilder

Rebase to master

* Update builder and tests

* Remove trailing spaces

* Update examples

* Refactor builder

* Update builder to use one animation

* Update scale

* Change deprecation message, remove white spaces

* Change deprecation message

* Change deprecation message

* Change deprecation message

* Update documentation

* Update documentation

* Update documentation and examples

* Update documentation and examples

* Remove white spaces

* Remove white spaces

* Remove const

* Address linting errors

* Seperate builder into own constructor

* Remove trailing characters

* Formatting changes

* Remove white spaces

* Change ignore comment

* Add TODO

* Remove whitespace
2022-11-30 16:28:04 -07:00
Taha Tesser
333397a0ed
Fix Material 3 BottomSheet example (#116112)
fix title
2022-11-30 02:08:21 +00:00
Greg Spencer
0cb9f70460
Menu bar accelerators (#114852)
* Add MenuMenuAcceleratorLabel to support accelerators.

* Review Changes

* Review Changed

* Fix default label builder to use characters

* Remove golden test that shouldn't have been there.
2022-11-29 00:27:20 +00:00
Zachary Anderson
a84e369bd2
Revert "Allow Flutter golden file tests to be flaky (#114450)" (#114902)
This reverts commit 53e6876226.
2022-11-08 09:26:55 -08:00
Kate Lovett
53e6876226
Allow Flutter golden file tests to be flaky (#114450)
* allow marking a golden check as flaky

* add matchesFlutterGolden to analyze.dart; no tags for flutter_goldens/lib

* Pause

* ++

* ++

* Analyzer therapy

* Once more with feeling

* Nits

* Review feedback

* Silly oops

* Test progress

* More tests

* Finish

* Nits

* Analyzer

* Review feedback

Co-authored-by: Yegor Jbanov <yjbanov@google.com>
2022-11-08 01:14:03 +00:00
Taha Tesser
eadda3c393
Add Material 3 Popup Menu example and update existing example (#114228) 2022-11-01 22:10:45 +00: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
Qun Cheng
3ce88d3813
Replace menu defaults with tokens (#113963) 2022-10-25 14:46:34 -07:00
Taha Tesser
7f75d24164
Add Material 3 ProgressIndicator examples (#113950) 2022-10-25 07:27:08 +00:00
Taha Tesser
b0e7c9c4f0
Move AnimatedIcons example and fix typo in cupertino/text_selection_toolbar.dart (#113937) 2022-10-25 07:27:06 +00:00
J-P Nurmi
28e0f089a2
Reland "[text_input] introduce TextInputControl" (#113758) 2022-10-24 07:23:32 -07:00
Zachary Anderson
9064bf674b
Revert "[text_input] introduce TextInputControl (#76072)" (#113724)
This reverts commit 2fdfa29e08.
2022-10-19 15:00:00 -07:00
Taha Tesser
8815f60a5a
Add AnimatedIcons previews and examples (#113700) 2022-10-19 17:12:19 +00:00
Greg Spencer
7523ab5cc1
Add SliverAnimatedGrid and AnimatedGrid (#112982) 2022-10-07 22:15:11 +00:00
Greg Spencer
6b32c0691b
Add checkbox and radio menu buttons (#112821) 2022-10-07 21:13:36 +00:00
J-P Nurmi
2fdfa29e08
[text_input] introduce TextInputControl (#76072)
Allows the creation of virtual in-app keyboards written in Flutter.  Especially useful for embedded environments.
2022-10-04 15:23:12 -07:00
Taha Tesser
6432742036
Update AnimatedSlide example (#112803) 2022-10-03 18:44:13 +00:00
Darren Austin
2bf83dd860
Add support for Material 3 Divider and VerticalDivider (#112655) 2022-09-29 11:30:53 -07:00
Taha Tesser
fd6997f07a
Add Dialog.fullscreen and example (#112261) 2022-09-29 09:12:05 -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
Casey Hillers
bd5c347193
Revert "Add support for Material 3 Divider and VerticalDivider" (#112471) 2022-09-27 15:15:59 +00:00
Taha Tesser
1d5f455c4c
Add support for Material 3 Divider and VerticalDivider (#112378) 2022-09-26 20:36:09 +00:00
Anthony Oleinik
4ceeca0833
Added example for Magnifier and TextMagnifier (#110218) 2022-09-23 20:29:32 +00:00
Taha Tesser
844a8ad7e8
Update CupertinoSwitch example (#112063) 2022-09-21 15:27:20 +00:00
Greg Spencer
fb28a0d3fe
Re-Land "Actually add example templates (#111531)" (#111666) 2022-09-15 16:17:06 +00:00
Zachary Anderson
e2d3019a37
Revert "Actually add example templates (#111531)" (#111632)
This reverts commit 7242ea2252.
2022-09-14 20:24:17 -07:00
Greg Spencer
7242ea2252
Actually add example templates (#111531) 2022-09-15 01:17:21 +00:00
Greg Spencer
e617d003fb
Normalize examples (#111223) 2022-09-09 21:17:11 +00:00
Darren Austin
33ed6a3533
Fixing elevation issues with Material 3 (#110624)
* Added support for surfaceTintColor and shadowColor to the Dialog widgets.
* Updated the defaults for Material.shadowColor and Material.surfaceTint to allow turning off the features with a transparent color.
* Added support for shadowColor and surfaceTintColor for Drawer widget.
2022-09-06 16:16:45 -07:00
Pierre-Louis
8853926601
Deprecate ThemeData errorColor and backgroundColor (#110162) 2022-09-02 04:02:55 +00:00
LongCatIsLooong
bdb74e16c6
Fix Action.overridable example (#110824) 2022-09-02 00:46:21 +00:00
Akshdeep Singh
519a5783c0
add material slider secondary value (#109808) 2022-08-28 23:26:32 +00:00
Greg Spencer
fefb2b00ba
Re-Land "Refactor StrokeAlign to allow double values." (#108339) (#110234) 2022-08-25 20:56:24 +00:00
Qun Cheng
c0c3874c77
Revert "Reland: Set IconButton.visualDensity default to VisualDensity.standard (#109432)" (#110119)
This reverts commit 79013b2be8.
2022-08-23 15:41:03 -07:00
Bryan Oltman
6540ae0be7
Add clipBehavior to Card+InkWell example (#109872)
* Add clipBehavior to Card+InkWell example

* Add test for example

* Update comment
2022-08-22 11:24:23 -04:00
Greg Spencer
957a8da4a2
Revert "Re-Land "Refactor StrokeAlign to allow double values." (#109805)" (#109955)
This reverts commit b3aba4d9c8 because it breaks Google tests.
2022-08-21 20:18:09 +02:00
Greg Spencer
b3aba4d9c8
Re-Land "Refactor StrokeAlign to allow double values." (#109591) (#109805) 2022-08-19 19:36:11 +00:00
Qun Cheng
79013b2be8
Reland: Set IconButton.visualDensity default to VisualDensity.standard (#109432)
* Revert "Revert "Set `IconButton.visualDensity` default to `VisualDensity.standard` (#109349)" (#109421)"

Co-authored-by: Qun Cheng <quncheng@google.com>
2022-08-18 09:46:13 -07:00
Taha Tesser
9da693e3fa
Add an example for how to hide default scrollbar on desktop platform. (#108542) 2022-08-18 13:09:23 +00:00
Casey Hillers
370fc483e3
Revert "Refactor StrokeAlign to allow double values." (#109591) 2022-08-16 06:56:07 +00:00
Bernardo Ferrari
dd8573b871
Refactor StrokeAlign to allow double values. (#108339) 2022-08-15 20:23:20 +00:00
Qun Cheng
625d96a1c6
Revert "Set IconButton.visualDensity default to VisualDensity.standard (#109349)" (#109421)
This reverts commit 3070baf175.
2022-08-11 15:29:19 -07:00
Qun Cheng
3070baf175
Set IconButton.visualDensity default to VisualDensity.standard (#109349)
* Set IconButton's visualDensity to standard

Co-authored-by: Qun Cheng <quncheng@google.com>
2022-08-11 10:59:51 -07:00
Ian Hickson
9b2668a451
Minor fix compendium (#107874) 2022-08-11 02:33:07 +00:00
Ian Hickson
7ded3d91da
API documentation cleanup (#108500) 2022-08-10 22:03:20 +00:00
Bruno Leroux
8faccb8a82
Reland: "Add example and troubleshooting comment for showSnackBar" (#105195) 2022-08-09 22:06:05 +00:00
Greg Spencer
f5e4d2b427
Replace FocusTrap with TapRegionSurface (#107262) 2022-07-29 16:00:07 +00:00
Taha Tesser
76df7368b5
Update Chips examples and rename files (#108538) 2022-07-29 07:17:06 +00:00
Bryan Oltman
e3d08fb6d3
Hide the debug banner in the PopupMenuButton example (#108324)
* Hide the debug banner in the PopupMenuButton example

* Add test to verify that debug banner is not shown
2022-07-26 10:43:35 -04:00
Tong Mu
4056d3ffde
Explain the "patching" protocol in KeyMessageManager.keyMessageHandler and add an example (#105280) 2022-07-26 05:42:05 +00:00
Marcel Čampa
0c40945a67
Implement CupertinoListSection and CupertinoListTile (#78732) 2022-07-19 18:46:30 -05:00
Taha Tesser
cf342254cc
Add an interactive example for Overlay (#107531) 2022-07-15 09:44:05 +00:00
Taha Tesser
c422d280ab
Add an example for AppBar.notificationPredicate (#106018) 2022-07-15 09:40:06 +00:00
Taha Tesser
c251856c89
Update ListTile docs for color animation issues and add example (#106955) 2022-07-13 08:09:07 +00:00
Taha Tesser
66cd09dd82
Update PopupRoute docs and add an example (#106948) 2022-07-12 08:59:05 +00:00
Aman Verma
3022db2bf3
docs: Add more potential use case for Bottom Navigation Bar (#99644) 2022-06-23 17:17:06 +00:00
Youssef Attia
082560313b
Added an example for IndexedStack widget (#105318)
* Added an example for IndexedStack

* Added tests for the IndexedStack example

* Fixed type issue for onSubmitted callback functions

* Fixed documentation and moved files to their appropriate places

* Fixed documentation and moved files to their appropriate places

* Moved test files to their appropriate places

* Moved test files to their appropriate places

* Fixed file path in documentation

* Remove trailing space

* Formatting changes

* Remove extra line

* Further formatting changes

* Further formatting changes

* fix comma and inline

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>

* Formatting

* indentation and formatting

* Formatting

* Formatting

* Formatting

* Removed duplicate chevron

* better wording on documentation

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>

* Added testing for state preservation

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2022-06-13 16:38:37 -07:00
Hans Muller
d8783ff4c2
Reland Added MaterialStatesController, updated InkWell et al. #103167 (#105656) 2022-06-10 08:12:49 -07:00
Hans Muller
9cf042ec74
Revert "Added MaterialStatesController, updated InkWell et al. (#103167)" (#105138)
This reverts commit 180566f2e5.
2022-06-01 17:19:16 -07:00
Taha Tesser
71a9ccbf2c
InheritedModel: Add a complete interactive example and update snippet for null safety (#104174) 2022-05-30 06:13:10 -07:00
Kate Lovett
2aa7317296
Revert "Add error message and documentation when a SnackBar is off screen" (#104843) 2022-05-27 11:58:14 -07:00
Hans Muller
180566f2e5
Added MaterialStatesController, updated InkWell et al. (#103167) 2022-05-27 08:38:42 -07:00
Bruno Leroux
bc53e6202e
Add error message and documentation when a SnackBar is off screen (#102073) 2022-05-26 05:15:07 -07:00
Pierre-Louis
308b543783
Use curly_braces_in_flow_control_structures for sample code (#104617)
* use `flutter_lints` for sample code

* update packages

* Revert "update packages"

This reverts commit 14da3c69a8.

* revert
2022-05-26 08:59:37 +02:00
Taha Tesser
97452d1a10
Switch: Add an interactive example (#103045)
* `Switch`: Add an interactive examples

* Update docs

* Update doc
2022-05-25 10:40:31 +02:00
Bruno Leroux
1e0a1a2661
Add an example and update GestureDetector documentation (#102360) 2022-05-24 16:38:09 -07:00
Taha Tesser
5739bf4fab
RefreshIndicator: Add notificationPredicate example (#103894) 2022-05-24 04:58:06 -07:00
Taha Tesser
3f5bd7d89e
Add Material 3 AppBar example (#102823) 2022-05-19 00:13:09 -07:00
Bryan Oltman
89f755c2df
Replace references to LinearProgressIndicator in CircularProgressIndicator example (#103349)
* Replace references to LinearProgressIndicator in CircularProgressIndicator example

* Add test

* fix copyright header
2022-05-09 16:04:02 -04:00
Taha Tesser
92a59caa7f
CupertinoTabScaffold/CupertinoTabController: Add interactive examples (#103196)
* `CupertinoTabScaffold`/`CupertinoTabController`: Add interactive examples

* fix class name in the test

* Kick tests
2022-05-09 11:16:32 +02:00
Taha Tesser
803f9959d8
Update Cupertino examples and add missing tests (#103128) 2022-05-07 00:29:10 -07:00
Taha Tesser
9489b64cbb
DropdownButton: Update selectedItemBuilder example to show case item alignment and update DropdownButton examples (#102748) 2022-05-06 00:14:08 -07:00
Taha Tesser
d80f3e3921
Cupertino examples improvements and clean up (#103044) 2022-05-05 08:22:53 +02:00
Taha Tesser
27fee486ef
CupertinoSwitch: Add an interactive example (#103043)
Update
2022-05-05 07:59:55 +02:00
Taha Tesser
3ed0bbed5a
CupertinoActivityIndicator: Add an interactive example (#103040) 2022-05-05 07:59:29 +02:00
Taha Tesser
86e55df7f2
CupertinoFormRow: Add an interactive example (#103041)
* `CupertinoFormRow`: Add an interactive example

* fix typo

* Update docs
2022-05-05 07:58:53 +02:00
Taha Tesser
81fd748ac2
CupertinoSearchTextField: Add interactive examples (#103042)
* `CupertinoSearchTextField`: Add interactive examples

* Update docs
2022-05-05 07:58:15 +02:00
Taha Tesser
eef4aa7caa
Hero: Add an example for createRectTween (#102650) 2022-04-29 12:39:09 -07:00
Taha Tesser
4ffc41ad10
ToggleButtons: Add interactive example (#100124) 2022-04-29 12:29:07 -07:00
Phil Quitslund
80849adee1
[dev, bots, examples] rename local functions with _s (#102703) 2022-04-28 10:44:06 -07:00
Taha Tesser
b1f88a6535
ReorderableListView: fix broken dartpad example & update examples, add tests (#102723) 2022-04-28 10:19:08 -07:00
Bruno Leroux
37b3feea70
Add examples and troubleshooting comment for ClipRRect (#101907) 2022-04-18 10:24:08 -07:00
Taha Tesser
d8c9ce9ab4
Add Material 3 FloatingActionButton and FloatingActionButton variants examples (#101105) 2022-04-18 10:09:07 -07:00
Taha Tesser
eca09252cd
Add Material 3 NavigationRail example and improve Material 2 example (#101345) 2022-04-18 06:54:07 -07:00
Taha Tesser
b8734b1700
Add Material 3 Dialog examples and update existing Dialog examples (#101508) 2022-04-18 04:14:05 -07:00
Daniel Agbemava
2d9e171870
Update WidgetsBindingsObserver example (#101512) 2022-04-12 10:09:08 -07:00
Michael Goderbauer
a01424773e
Enable unnecessary_import (#101600) 2022-04-08 12:56:45 -07:00
Greg Spencer
efe76a5373
Update key examples to use Focus widgets instead of RawKeyboardListener (#101537)
This updates the examples for PhysicalKeyboardKey and LogicalKeyboardKey to use Focus widgets that handle the keys instead of using RawKeyboardListener, since that usually leads people down the wrong path. Updated the See Also and added tests as well. Also exposed the `physicalKey` attribute for `tester.sendKeyEvent`.
2022-04-08 12:05:41 -07:00
Taha Tesser
4526519225
Tooltip: Add an example for TooltipTriggerMode.manual and add tests for existing Tooltip examples (#100554) 2022-03-25 15:51:06 -07:00
Mahesh Jamdade
67a0df41cd
Adds a Listview tile select example (#99165) 2022-03-07 18:56:17 -08:00
Taha Tesser
d1daa5ddc2
CupertinoSliverNavigationBar: Add example (#99384)
Part of #72926
2022-03-02 18:31:50 -08:00
Michael Goderbauer
00f3f2b14f
More beautiful linear_gradient sample (#99298) 2022-03-02 16:41:21 -08:00
Mahesh Jamdade
0038a3e29f
Add NavigationBar dartpad example (#97046) 2022-03-01 10:14:09 -08:00
Alberto
b44cbe1dd5
feat: Added docstring examples to AnimatedBuilder and ChangeNotifier (#98628) 2022-02-28 12:41:20 -08:00
Michael Goderbauer
ac1fc234ea
Update example code and docs for InteractiveViewer.builder (#98623) 2022-02-16 17:25:17 -08:00
Taha Tesser
2097fe64f0
CupertinoPicker: Update example (#98525) 2022-02-15 20:20:22 -08:00
Hans Muller
db4c98fcb0
Added a NavgationBar example with nested Navigators (#98440) 2022-02-15 13:28:47 -08:00
Taha Tesser
fd4b1e86e8
CupertinoSlidingSegmentedControl: Add an interactive example (#98156) 2022-02-15 10:05:11 -08:00
Taha Tesser
7943ae5502
CupertinoSegmentedControl: Add an interactive example (#98154) 2022-02-15 09:30:19 -08:00
Taha Tesser
dfd42444e9
Update CupertinoTextField example (#93738) 2022-02-15 09:10:20 -08:00
Taha Tesser
ee0bbf4789
Add CupertinoPicker interactive example (#93622) 2022-02-15 06:25:20 -08:00
Taha Tesser
513c6cd7a8
CupertinoAlertDialog: Update sample (#98357) 2022-02-14 16:25:20 -08:00
Taha Tesser
7d21dbf5e0
CupertinoActionSheet: Update sample (#98356) 2022-02-14 16:10:08 -08:00
Taha Tesser
19a380ffe7
Add CupertinoSlider example (#93633) 2022-02-14 12:10:13 -08:00
Taha Tesser
e5f9d5bd26
Update PopupMenuButton example (#96681) 2022-01-28 14:10:14 -08:00
Taha Tesser
fc71ec55ee
Add CupertinoTimerPicker Interactive Example (#93621) 2022-01-28 06:35:17 -08:00
Taha Tesser
120d25f786
RefreshIndicator: Add an interactive example (#97254) 2022-01-28 02:40:06 -08:00
Greg Spencer
017ed1792b
Move examples from dart:ui ui/lib/text.dart to examples/api (#96557)
This extracts the examples that are in flutter/engine@main/lib/ui/text.dart into examples in the examples/api/lib/ui directory and adds some simple tests for them.

Also, fixes some inconsistent test file naming.

This is step 1: the next step is to remove the examples from the dart:ui code.
2022-01-14 15:42:54 -08:00
Greg Spencer
5012c99df5
Add example for CustomMultiChildLayout (#96632)
This adds a simple example to CustomMultiChildLayout that lays out colored containers in a cascade.
2022-01-14 10:54:15 -08:00
Markus Aksli
75e2470302
Add Ink.image clip examples (#93799) 2021-12-17 02:54:14 -08:00
Taha Tesser
139a4d3992
Add CupertinoDatePicker Interactive Example (#93509) 2021-12-15 13:14:12 -08:00
Greg Spencer
bbc21fe3ed
Fix some issues with samples (#95044) 2021-12-13 09:29:09 -08:00
Markus Aksli
f704b0d708
Add InputDecorator label color on error examples (#93480) 2021-12-08 17:24:08 -08:00
Michael Goderbauer
f4a44a9d68
Reland "Mixin for slotted RenderObjectWidgets and RenderBox (#94077)" (#94632) 2021-12-03 14:39:02 -08:00
Michael Goderbauer
885a1482f8
Revert "Mixin for slotted RenderObjectWidgets and RenderBox (#94077)" (#94620)
This reverts commit 988959dad9.
2021-12-03 10:39:11 -08:00
Michael Goderbauer
988959dad9
Mixin for slotted RenderObjectWidgets and RenderBox (#94077) 2021-12-03 09:29:06 -08:00
Taha Tesser
7dcdfe6304
Add CupertinoButton interactive example (#93625) 2021-11-16 15:08:05 -08:00
Taha Tesser
13d14f1843
[doc] Update suffixIcon/prefixIcon for alignment with code snippet (#91998) 2021-10-27 00:38:02 -07:00
Greg Spencer
983cbb273b
Add example test, update example READMEs (#91130) 2021-10-04 13:53:02 -07:00