Commit Graph

519 Commits

Author SHA1 Message Date
Jonah Williams
d6465c477a Fix system chrome colors on gallery and definition in iOS (#18735) 2018-06-22 13:51:08 -07:00
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
Todd Volkert
7c60b7405a Instrument vm service extensions in the gallery (#17977)
https://github.com/flutter/flutter/issues/17956

* Add a `debugInstrumentAction()` method that will wrap an action
  in a stopwatch and print the time it took to run the action.
* Add a global `debugInstrumentationEnabled` that will control
  whether `debugInstrumentAction()` does anything (even in debug
  builds).
* Add some basic instrumentation to `registerServiceExtension()`
* Temporarily enable the `debugInstrumentationEnabled` flag in the
  Gallery to give us better visibility into what's happening in
  https://github.com/flutter/flutter/issues/17956
2018-05-28 12:40:43 -07:00
Michael Goderbauer
d5a103402c Expandable Search (#17629) 2018-05-24 09:30:37 -07:00
Hans Muller
6c03a3f96b adapt home screen layout for large screen sizes (#17816) 2018-05-22 15:57:41 -07:00
Greg Spencer
1f5fcb7432 Speed up AnimatedSwitcher. (#17265)
This optimizes the AnimatedSwitcher so that it tags the right widget with its keyed subtree, and avoids rebuilding the transition unnecessarily.

This significantly improves the performance of Chips (which uses AnimatedSwitcher to swap out it's avatar and delete icon children).
2018-05-18 16:27:19 -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
Hans Muller
580c844c2f Added GalleryApp testMode (#17640) 2018-05-16 11:42:39 -07:00
Hans Muller
ef20f726e3 Gallery a11y fix: give the categories and demos pages "route" scope (#17516) 2018-05-11 11:57:55 -07:00
Hans Muller
6c8d5f1bd3 Stop Gallery the logo to back-button cross fade shaking (#17513) 2018-05-11 11:17:07 -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
a02568b3ca Added MediaQuery.textScaleFactorOf() (#17450) 2018-05-09 17:08:22 -07:00
Michael Goderbauer
501316fd02 Make Headers be one sementics node in gallery (#17445) 2018-05-09 16:05:35 -07:00
Hans Muller
eee986b076 Gallery cosmetic updates (#17310) 2018-05-07 09:25:50 -07:00
Chris Bracken
c9954f1053 Gallery demos: reordered and retitled (#17220) (#17273) 2018-05-03 18:26:46 -07:00
Chris Bracken
322eb81a79 Revert longPress/Tap and Gallery changes (#17269)
Revert longPress/Tap and Gallery changes
2018-05-03 16:51:45 -07:00
xster
b2db3bafef Make Android back button presses in a demo category not unexpectedly quit the app (#17224) 2018-05-03 11:15:51 -07:00
Hans Muller
22c12f9f92 Gallery demos: reordered and retitled (#17220) 2018-05-03 11:05:48 -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
xster
4e6045883c Fix front layer can be tapped through bug on gallery (#17181) 2018-05-02 14:31:59 -07:00
Hans Muller
dba7855de8 Update the gallery BottomAppBar demo (#17177) 2018-05-02 11:18:48 -07:00
Hans Muller
8d0ec25eb6 Updated the error color in the Gallery themes (#17200) 2018-05-02 11:09:28 -07:00
xster
7982a3a277 New gallery performance improvements (#17167) 2018-05-01 18:08:13 -07:00
xster
709b0cb285 Accessibility fixes for new gallery (#16973) 2018-04-30 17:19:00 -07:00
Hans Muller
5c2259d505 Cross fade gallery UI front layer (#17064) 2018-04-30 08:23:11 -07:00
xster
396298fb39 Give more room for the front layer drag on iPhone X for new Gallery (#16975)
* Give more room for the front layer drag on iPhone X

* Tweak the animation visual effects

* review lint
2018-04-27 16:25:42 -07:00
Jonah Williams
84dbef3982 add route semantics to backdrop widget (#16981) 2018-04-27 13:24:21 -07:00
Hans Muller
bf3bd7667f New Gallery UI reprise (#17031) 2018-04-27 08:11:20 -07:00
Hans Muller
38d5d46127 Revert "New Flutter Gallery UI" (#16984)
* Revert "New Flutter Gallery UI (#16936)"

This reverts commit 7038597b02.
2018-04-25 18:41:07 -07:00
Hans Muller
7038597b02 New Flutter Gallery UI (#16936)
A new front-end for the Flutter Gallery example.
2018-04-25 14:15:34 -07:00
Hans Muller
cdb82fce92 Put the backdrop demo controls on the right (#16902) 2018-04-23 17:19:39 -07:00
xster
8e7139a049 Make the gallery about dialog open the website in Safari (#16830) 2018-04-20 19:03:03 -07:00