Commit Graph

420 Commits

Author SHA1 Message Date
amirh
c39f2f26f7
Move the notch computation from the FAB to the BAB. (#18372)
Move the notch computation from the FAB to the BAB.

The notch in the BAB (bottom action bar) for the FAB (floating action button) was previously kept as part of the FAB's implementation. This was done to keep the shape of the FAB and the shape of the notch coupled.
That approach resulted in a somewhat complex and 'non Fluttery' mechanism for propagating the notch computation from the FAB to the BAB.

This CL uncouples the FAB and the notch computation.
With the new API the BAB computes its overall shape including the notch using a NotchedShape delegate.

This includes multiple breaking changes:
  * Scaffold.setFloatingActionButtonNotchFor is deleted.
  * The ComputeNotch type is deleted.
  * The hasNotch property of BottomAppBar is deleted.
  * The notchMargin property of FloatingActionButton is deleted.

Quick migration guide from the previous API:

| Previous API | New API |
| ------------------|-------------|
| BottomAppBar(hasNotch: false) | BottomAppBar() |
| Using a FloatingActionButton with: BottomAppBar() / BottomAppBar(hasNotch: true) | BottomAppBar(shape: CircularNotchedRectangle()) |
| Scaffold.setFloatingActionButtonNotchFor(..) | No longer supported |
2018-06-21 15:51:21 -07:00
Greg Spencer
efa2a474ea
Adding HSLColor and color 'within' matchers for HSVColor and HSLColor (#18294)
This adds an HSLColor class which uses a perceptual color space based upon human perception of colored light (as opposed to HSV, which is based on pigment colors).

You can see the difference in the color spaces here: https://en.wikipedia.org/wiki/HSL_and_HSV

I also added a "within" matcher for both HSLColor and HSVColor that will check if the (floating point) color components are within a certain error.

And tests.
2018-06-18 17:11:42 -07:00
Chris Bracken
03b5b1c0bd Check video widget is mounted on call to setState (#18467)
When setState() calls occur asynchronously, it's possible that the
Futures on which they're waiting don't complete until the widget is
offscreen. To avoid this, we check the widget is mounted before calling
setState().
2018-06-13 20:51:53 -07:00
Chris Bracken
2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Alexandre Ardhuin
e45836f271
enable lint avoid_field_initializers_in_const_classes (#18415) 2018-06-13 07:20:18 +02:00
Greg Spencer
6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Mehmet Fidanboylu
226f2c1e99
Fix broken asset uris (#18336) 2018-06-09 20:11:08 -07:00
Will Larche
326caa5d22 [Gallery] Updated assets and copy (#18324) 2018-06-09 00:39:27 -07:00
Jonah Williams
d803f02d4f
Add activeIcon property to BottomNavigationBarItem (#18125) 2018-06-07 15:42:54 -07:00
Jonah Williams
0891a1136b
update a11y for material slider (#18005) 2018-06-07 15:41:35 -07:00
Anthony
fc5d44d7ac
Correct RaisedButton to OutlineButton for disabled outline example in buttons demo (#18243) 2018-06-06 17:44:07 -04:00
Alexandre Ardhuin
09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Jonah Williams
49bcda52a2
remove ExcludeSemantics from bottom app bar demo (#18033) 2018-05-31 10:45:07 -07:00
Greg Spencer
b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer
3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Michael Goderbauer
d5a103402c
Expandable Search (#17629) 2018-05-24 09:30:37 -07:00
Greg Spencer
3c5a7a3005
Make non-global constants have consistent naming (with just _ instead of _k) (#17584)
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.

Only naming changes to private vars: no logic changes.
2018-05-17 23:04:41 -07:00
Greg Spencer
e4b574d3d3
Cupertino Dialog Changes (#17676)
This replaces abandoned PR #14824 by @ekbiker, and gives it some love.
2018-05-17 22:36:16 -07:00
Greg Spencer
ac67efbc83
Moving API doc asset URLs to point to the new location. (#17697)
I'm moving the assets in the assets-for-api-docs repo to a slightly different location to help with organization in that repo, so this PR points the doc URLs to the new location. The old assets won't be removed until this PR makes its way to the API docs website.

No documentation or code changes here, other than changing doc image URLs.
2018-05-17 09:53:06 -07:00
xster
e8d99d12c4
Fix backdrop demo margin for iPhone X (#17480) 2018-05-10 17:36:20 -07:00
xster
e42c50cf20
Post libtxt/post iOS 11 fidelity fine tuning (#17366) 2018-05-10 17:35:18 -07:00
Hans Muller
eee986b076
Gallery cosmetic updates (#17310) 2018-05-07 09:25:50 -07:00
Konstantin Scheglov
9fe53b0d2b
Export @required from src/widgets/framework.dart (#17208) 2018-05-03 08:50:40 -07:00
Hans Muller
c75db13f18 Fixed a typeO (#17223) 2018-05-02 17:43:32 -07:00
Hans Muller
dba7855de8
Update the gallery BottomAppBar demo (#17177) 2018-05-02 11:18:48 -07:00
Hans Muller
5c2259d505
Cross fade gallery UI front layer (#17064) 2018-04-30 08:23:11 -07:00
Hans Muller
cdb82fce92
Put the backdrop demo controls on the right (#16902) 2018-04-23 17:19:39 -07:00
Jonah Williams
034a663d33
Semantics object support for edge triggered semantics (#16081)
Semantics object support for edge triggered semantics
2018-04-19 17:59:19 -07:00
xster
d05bc9c0e3
Remove UI with the word 'demo' from the gallery (#16767) 2018-04-19 16:53:21 -07:00
Greg Spencer
b83eb465fd
Updating the Chip demo in the Gallery to include all the new types of chips. (#16522)
This chip demo is more interactive than the last one, trying to exercise all of the types of chips for a demo that lets you select different types of "chips" (like tortilla, wood, micro, etc.), and then filter them and select an action on them.
2018-04-19 16:43:22 -07:00
Greg Spencer
5129d8ffa6
Rename Rail to Track, per UX guideline (#16519) 2018-04-12 12:32:30 -07:00
David Shuckerow
5cd825a8dc
Fix performance regression caused by the Bottom App Bar demo (#16389) 2018-04-11 12:01:28 -07:00
Alexander Aprelev
a2951a9a1f Roll engine to ed303c628fe4b322529f8cf01ecb38135a2bab73 (dart roll)
Changes since last roll:
```
ed303c628 Roll dart sdk again. Previous roll required 23ae4fa098 revert. (#4966)
8cd272733 Revert "Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884. (#4960)" (#4965)
9199b40f2 Revert "Support multiple shells in a single process. (#4932)" (#4964)
6baff4c82 Support multiple shells in a single process. (#4932)
31c5bb427 Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884. (#4960)
c8e4c6984 Avoid copying the contents of large platform message responses (#4947)
5ff527295 Update to use new vulkan GrBackendRenderTarget ctor. (#4962)
0c8993a1a Update to use new vulkan GrBackendRenderTarget ctor (part 2) (#4963)
132ebdda8 Revert "Roll src/third_party/skia/ 9874bf1bc..52e16d984 (135 commits) (#4958)" (#4961)
11882ab9e Roll src/third_party/skia/ 9874bf1bc..52e16d984 (135 commits) (#4958)
```

Add consts
2018-04-10 20:17:06 -07:00
Landon Woerdeman
03a0cd25a5 Make full-screen dialog text editable in gallery (#13690) (#15732)
Make the full-screen dialog text editable in gallery (#13690)
2018-04-10 08:31:24 -07:00
David Shuckerow
c02ad6fd41
Make no-op buttons more accessible by showing a SnackBar when they're pressed (#16284)
* Remove explicit child nodes

* Remove semantics on no-op menu buttons

* Add a dummy action to the overflow bar
2018-04-06 10:00:38 -07:00
David Shuckerow
3aebc070e8
a11y adjustments for the Bottom app bar demo (#16238) 2018-04-05 09:43:27 -07:00
Sarah Zakarias
7010bd416c
Play butterfly video from asset instead of network (#16269) 2018-04-05 14:40:56 +02:00
ztplz
47a576b296 Add disable Cupertino Switch example (#15853)
* Add disable Cupertino Switch example

* keep trailing commas consistent

* fix Cupertino Switch example linter error
2018-04-04 14:42:35 -07:00
David Shuckerow
68c77e37e2
Add a bottom app bar to the floating action button motion demo. (#16196) 2018-04-03 19:30:14 -07:00
Hans Muller
f3c742c8a6
Added BottomAppBar docked FloatingActionButtonLocations (#16167)
* Added BottomAppBar docked FloationActionButtonLocations

* Moved the startTop FloatingActionButtonLocation to the demo

* fixed a typo
2018-04-03 14:25:06 -07:00
Hans Muller
5e9424419e
updated_card (#16187) 2018-04-03 10:35:07 -07:00
Hans Muller
8e97807671
Support for disabling TextField, TextFormField (#16027) 2018-03-29 07:28:22 -07:00
Hans Muller
0eec5ad0ad
Fixed an uninitialized bool in the gallery FAB demo (#16012) 2018-03-28 07:50:00 -07:00
Hans Muller
a0099a9016
Make gallery tests more robust (#15957) 2018-03-27 13:39:30 -07:00
Hans Muller
3a93061e9e
Extended Floating Action Button (#15841) 2018-03-23 14:40:18 -07:00
Ian Hickson
fc87097119
Add Form.onChanged, and rename FormState.onChanged (#15405) 2018-03-22 15:56:10 -07:00
Ian Hickson
aba0379dcc
Clean up the existing Navigator API. (#15718)
This is not a grand refactor yet, it's just cleaning up what we have
already, so that people who keep using this API (e.g. dialogs) have
something coherent to deal with.

The major changes are that Navigator and NavigatorState have the same
API now, that most of the examples use `<void>` instead of `<Null>`,
that the navigator observer can see replaces, and that the `settings`
is moved from ModalRoute to Route. I also cleaned up some of the API
documentation.
2018-03-22 13:21:07 -07:00
Hans Muller
3a2e0d9375
Extended ButtonTheme, RoundedRectangleBorder, gallery buttons demo (#15723) 2018-03-22 13:20:18 -07:00
Ian Hickson
f2ffc8de79
Fix RTL icons (#15095) 2018-03-21 17:58:07 -07:00
xster
feadfd2e40
Cupertino pull to refresh part 1: sliver and a simple indicator widget builder (#15324)
* Gallery scaffolding

* Started RenderSliver

* demo and initial hookup

* Cleaned up demo more and scaffolding basic sliver->widget communication structure.

* works

* states and default indicator building works

* start adding docs

* added an alignment setting optimized the sliver relayout mechanism

* tested a default bottom aligned sized indicator

* Added a bunch of tests

* more fixes and more tests

* Finished the tests

* Add docs

* Add more doc diffing wrt material pull to refresh

* Mention nav bar synergy

* add more asserts

* review 1

* Fix mockito 2 / dart 2 / strong typed tests

* review

* Remove the vscode config

* review
2018-03-21 17:27:58 -07:00