Commit Graph

116 Commits

Author SHA1 Message Date
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02: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
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
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
xster
e8d99d12c4
Fix backdrop demo margin for iPhone X (#17480) 2018-05-10 17:36:20 -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
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
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
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
Greg Spencer
10fe2056f3
Add a slider demo, and a text theme for SliderThemeData (#15620)
This adds a slider demo with a custom theme to the gallery.

In the process of adding this, I decided to add a text theme to the SliderThemeData, since it's a pain to change the text style on the value indicator otherwise.
2018-03-19 14:50:29 -07:00
Hans Muller
c599662903
Added a Backdrop demo to the Gallery (#15579) 2018-03-15 17:52:09 -07:00
David Shuckerow
dd0acea1ec
Add support for placing the FAB in different positions (#14368)
* Add support to move the fab between positions.

* Motion demo for the FAB works between center and end floating.

* Add a Material curve to the offset animation.

* Move the fab position into an object

* Updates to docs

* Updates to docs

* Fix a lint on the bottom sheet type

* Add a ScaffoldGeometry class

* Improve the documentation

* Improve the documentation

* Add a fab motion animator

* Add position and scale animations

* FAB entrance and motion animations work

* Get started on FAB motion

* Make fab animation work properly.

* Change the fab animator to be stored in the state of the scaffold.

* Add a layout test

* Fix spacing being off

* Fix the entrance/exit animation test.

* Add a textDirection to the layout delegate.

* Fix const constructor lint checks

* Add toStrings for the fab positioner/animator

* Add a toString for CurveTween

* Change the fab motion demo icon to a simple add icon.

* Add tests and a custom fab positioner to the demo.

* Do not start the fab's motion animation when the fab is null.

* Adjust the code to pass the new tests.

* Rename for in response to Hans' comment.

* Revert the tabs fab demo

* Use timeDilation, and clean up the animation code a little.

* Clean up the prelayout geometry docs and ctr order

* Cleanup fab transition widget code

* Clean up comments on Scaffold, add cross-references between the two geometries

* Explain the fab motion animation scheduling better

* Add a const to the fab motion demo

* Make the fab animation never jank by keeping track of where to move the fab to in the future.

* Add a default fab positioner constant

* Add space after comma in the demo

* Add boilerplate dartdoc to all const constructors

* Comment improvement

* Rename 'fabSize' to 'floatingActionButtonSize'

* Rename 'fabSize' to 'floatingActionButtonSize'

* Rename 'fabSize' to 'floatingActionButtonSize'

* Clean up the prelayout geometry object's dartdoc

* Clean up the prelayout geometry object's dartdoc

* Remove extraneous comment

* Change possessive uses of Scaffold's to use dartdoc-compatible [Scaffold]'s

* Rename the horizontalFabPadding to an expansion

* Clean up controller cleanup and setState usage

* Animate instead of lerp

* Make the fab position animation use offsets instead of animations

* Streamline the fab motion demo

* Set up the animator to start from a reasonable place when interrupting animations.

* Doc cleanup on the new animation interruption

* Expand some uses of fab and clean up constants

* Expand remaining public uses of fab to floating action button

* Expand remaining public uses of fab to floating action button

* Expand on the documentation for the fab positioner and animator

* Refactor animations to broadcast the position properly.

* Add the ability to turn on and off the fab to the motion demo.

* Remove unused code

* Change the fab animator to animate even when the fab is exitting.

* Remove extra positioner.

* Apps -> Applications in docs

* Explain the scale animation.

* Name the child parameter in the animated builder

* RTL before LTR

* Wrap the AppBar in the example code

* const the fab motion demo name

* Start a test against animation jumps

* Test for jumps in the fab motion animation

* Dont initialize values to null

* Use constants, fix spacing from some of Hans' comments

* Clarify the relationship between fab positioners and prelayout geometries

* Explain the fab animmator a bit better

* Explain the animation progress in the fab animation

* Explain the animation restart better

* Explain the animation restart better

* Explain the prelayout geometry better

* Explain that height is a vertical distance.

* Explain the horizontal fab padding

* Update the scaffold size description to explain what happens when a wild keyboard appears

* Remove print statements

* Update the scaffold geometry with information about it being available at paint time.

* In one step of a transition

* Explain how the top-start fab positioner works

* Explain how the top-start fab positioner works

* Refactor the scaffold layout to just pass a padding instead of a bottom, top, start and end.

* Refactor the scaffold layout to just pass a padding instead of a bottom, top, start and end.

* Action buttons with with custom positioners.

* Add a rotation animation example.

* Use a swap animation to show swapping between two different animations.

* Use a swap animation to show swapping between two different animations.

* Add an example for the size animations.

* 2018 copyright

* Extra empty line

* Return new Scaffold

* Extra blank line fix

* All its contents have been laid out

* Position the fab

* Explain what the scaffold geometry is for.

* Move asserts to different lines

* The scaffoldsize will not

* Initial rename of FabPositioners to FloatingActionButtonLocation

* Rename comments in example to refer to location instead of positioner.

* Rename fabpositioner to location in tests and in the scaffold field

* Finish removing references to positioner in scaffold code.

* Split the fab location and animation out into a separate file.

* Make things more private

* Import foundation instead of meta

* Const curve instead of final.
2018-03-15 17:04:24 -07:00
Hans Muller
b6cca3923a
Updated the gallery text fields demo (#15362) 2018-03-14 14:42:45 -07:00
Jonah Williams
231170a7c5
Replace child parameter with builder on showDialog (#15303)
* replace child parameter with builder on showDialog

* change builder parameter to WidgetBuilder

* mark child as deprecated and expand documentation to cover this and how builder should be used

* tidy comments and address some feedback

* phrasing

* move space to prev line and add //ignore comments for deprecated member use

* address comments and fix it's its

* update code samples

* adds semicolon to code snippets
2018-03-14 10:40:24 -07:00
Hans Muller
07eb5ea0be
Added custom selection indicators to the gallery scrollable tabs demo (#15323) 2018-03-12 12:20:33 -07:00
Hans Muller
11d81b11d7
Add OutlineButton, Tristate Checkbox to Flutter Gallery (#15312) 2018-03-12 10:21:14 -07:00
Josh Soref
c5a5945e92 Spelling (#15229)
* spelling: accommodate

* spelling: allotted

* spelling: anonymous

* spelling: artificial

* spelling: associated

* spelling: asset

* spelling: button

* spelling: canvas

* spelling: compatibility

* spelling: coverage

* spelling: condition

* spelling: decoration

* spelling: deferring

* spelling: diameter

* spelling: direction

* spelling: displacement

* spelling: dropdown

* spelling: needing

* spelling: environment

* spelling: exited

* spelling: expansion

* spelling: explore

* spelling: families

* spelling: horizontal

* spelling: increment

* spelling: indices

* spelling: internationalization

* spelling: labrador

* spelling: localizations

* spelling: midflight

* spelling: milliseconds

* spelling: minimum

* spelling: multiple

* spelling: multiplication

* spelling: navigator

* spelling: overridden

* spelling: package

* spelling: performance

* spelling: platform

* spelling: porsche

* spelling: position

* spelling: preceded

* spelling: precede

* spelling: precedence

* spelling: print

* spelling: property

* spelling: readily

* spelling: reproducibility

* spelling: rounded

* spelling: scroll

* spelling: separate

* spelling: separator

* spelling: services

* spelling: specific

* spelling: specify

* spelling: synchronously

* spelling: through

* spelling: timeout

* spelling: triangle

* spelling: trivial

* spelling: unusual

* spelling: then

* spelling: vertically

* spelling: visible

* spelling: visited

* spelling: voice
2018-03-06 21:36:03 -08:00
Greg Spencer
701eff4ac5
Slider Visual Update (#14901)
This implements an update to the look of the Slider widget.

Specifically, it does the following:

* Adds the ability to customize the colors of all components of the slider
* Adds the ability to customize the shape of the slider thumb and value indicator
* Adds the ability to show the value indicator on continuous sliders
* Updates the default value indicator to be a "paddle" shape with new animations.
* Changes the tick marks to be visible all the time on discrete sliders
* Fixes a memory leak of an animation controller.
* Removes "thumbOpenAtMin" flag, which is no longer needed, and can be emulated by the
custom thumb shape support. It was not widely used.
* Adds tests for all of the new features.
2018-03-01 13:03:20 -08:00
Michael Goderbauer
be0c4888b0
Make various images in gallery accessible (#14467)
Discovered during an a11y review of the gallery.
2018-02-06 09:42:18 -08:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00