Commit graph

458 commits

Author SHA1 Message Date
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
Ian Hickson 171f94d179
Update gallery about box. (#15954) 2018-03-27 11:59:02 -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
xster 1eaf85036f
Update gallery drawer version (#15774) 2018-03-21 13:51:10 -07:00
Alexandre Ardhuin cc1cf9e12a
apply upcomming lint avoid_renaming_method_parameters (#15526) 2018-03-20 12:53:41 +01:00
xster 33fea5c19a
Remove the 'demo' wording from gallery (#15640) 2018-03-19 17:03:56 -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
xster 0e8b187728
Turn on Material page transition fade effect for Gallery (#15583) 2018-03-17 16:52:13 -07:00
Jason Simmons 6d5810eced
Fix an analyzer warning (#15627) 2018-03-16 15:54:44 -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
Hans Muller 4c7cc73637
Added an additional Material theme to the Gallery (#15492) 2018-03-14 10:52:06 -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
Alexandre Ardhuin 7667db6362
apply upcomming prefer_const_declarations (#15498) 2018-03-14 06:24:49 +01:00
Hans Muller 07eb5ea0be
Added custom selection indicators to the gallery scrollable tabs demo (#15323) 2018-03-12 12:20:33 -07:00
Jason Simmons 466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Hans Muller 11d81b11d7
Add OutlineButton, Tristate Checkbox to Flutter Gallery (#15312) 2018-03-12 10:21:14 -07:00
Michael Goderbauer 3a40d0ee4e
Support SemanticsFlag for Header (#15255) 2018-03-09 13:32:01 -08:00
Todd Volkert d996ab921c
Rename "slow mode" to be "debug mode" (#15205)
This moves toward more consistency in our messaging. Apps are
launched using --debug, so the banner will reflect the build
mode.
2018-03-08 12:54:06 -08: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
xster f048023638
Cupertino picker haptic (#14831)
* Add selection haptic feedback to Cupertino Pickers

* review

* don't haptic on android
2018-03-06 15:38:00 -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
Danny Tuppeny ae9fdefa4f
Fix example code just showing endless spinner when deployed from Windows (#14878)
* If example code is not found, render a message instead of an endless spinner
* Trim codeTags to avoid lookup issues with windows carriage returns
* Trim \r on Windows off the end of code blocks so they're consistently \n
* Add a test to ensure sample code parses if built on Windows
* Add a comment about why we trimRight()

Fixes #14820.
2018-02-28 20:39:48 +00:00
najeira e0956cbdb7 remove "the" duplications (#14952) 2018-02-28 12:21:13 -08:00
Alexandre Ardhuin bd1921ec84
unnecessary parenthesis (#14533) 2018-02-16 07:43:19 +01:00
Sigurd Meldgaard 2909fe2259
Don't fade video player volume in demo (#14638) 2018-02-13 09:27:45 +01:00
Chris Bracken 6494dde364
Apply media padding in Gallery Shrine demo (#14506)
Applies horizontal and bottom safe area insets to the Shrine demo in the
Gallery. Top insets are not applied due to the presence of the
omnipresent sliver app bar. Specifically, this ensures that the grid
cards are inset inside the iPhone X notch in horizontal mode, and that
the bottom of the grid is positioned above the iOS home indicator.
2018-02-06 15:54:10 -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 2e80bf1db7
unnessary parenthesis (#14475) 2018-02-06 09:00:11 +01:00
Ian Hickson e810bee6e5
Fix scrolling of multiple SliverLists and SliverGrids (#14449)
* Fix scrolling of multiple SliverLists and SliverGrids

* Update sliver_fixed_extent_list.dart

* Update sliver_grid.dart
2018-02-05 13:56:28 -08:00
Alexandre Ardhuin c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Ian Hickson c12d120bbf
Provide a way to override global InheritedWidgets (#14348)
For example, so that the gallery can override the media query globally.
2018-02-01 23:12:52 -08:00
Alexandre Ardhuin 841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Michael Goderbauer b54b576c1a
Assorted a11y fixes (#14395) 2018-01-31 15:23:20 -08:00
Vyacheslav Egorov 340d9e00cf
Fix various strong mode issues. (#14284) 2018-01-31 08:21:32 +01:00
xster 667f478506
CupertinoPicker part 4 - create CupertinoPicker and add gallery demo (#14091)
* controller, position and test

* Make controllers swappable

* WIP

* Create a ListWheelScrollPhysics

* Created picker and gallery demo and testing now

* Works. Ready to document and test.

* Document and add tests. Make the scroll controller more generic.

* minor cleanup

* review

* review

* fix tests

* stop using TransformLayers for now
2018-01-25 16:31:43 -08:00
Alexandre Ardhuin 10f721c8a5
use const instead of final with const declarations (#14253) 2018-01-25 19:28:22 +01:00
Ian Hickson bed71b9a15
Make FadeTransition more efficient (#14155)
* Make FadeTransition more efficient

* Update fade_transition_test.dart

* Update proxy_box.dart
2018-01-18 20:22:22 -08:00