Commit Graph

477 Commits

Author SHA1 Message Date
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
Alexandre Ardhuin
cc1cf9e12a
apply upcomming lint avoid_renaming_method_parameters (#15526) 2018-03-20 12:53:41 +01: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
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
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
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
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
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
Ian Hickson
3ac9449ad4
Fix the confusing-zero case with NestedScrollView. (#14133)
* Fix the confusing-zero case with NestedScrollView.

* Update mock_canvas.dart

* Update tabs_demo.dart

* more tweaks
2018-01-18 20:21:15 -08:00
Alexandre Ardhuin
0fe1e5bf5b
apply upcoming lint prefer_const_literals_to_create_immutables (#14029) 2018-01-11 08:38:55 +01:00
xster
0f11de2e06
add email to the text fields demo (#13946) 2018-01-08 16:57:52 -08:00
xster
1eb6a95fcb
Pipe onsubmit for text form fields (#13687) 2018-01-03 23:57:38 +08:00
Michael Goderbauer
94f48c2cc6
Make UserAccountsDrawerHeader accessible (#13851)
Fixes #13743 
Fixes #12379
Follow-up to #13745

Also adds an option to hide gestures introduced by `InkWell` and `InkResponse` from the semantics tree (see also `GestureDetector.excludeFromSemantics`).
2018-01-02 16:28:31 -08:00
Chris Bracken
f4040455d1
Minor formatting fixes (no logical changes) (#13855)
Reformats a SafeArea introduced in #13853.
2018-01-02 15:42:48 -08:00
Chris Bracken
ece737d145
Apply media padding to Gallery animation demo (#13853)
Applies horizontal safe area insets to the animation demo in the
Gallery. Specifically, this ensures the back button is positioned
consistently with iOS expectations and that that main image card in the
detail view respects safe area insets.

This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
2018-01-02 14:09:32 -08:00
Chris Bracken
882eb24e1e
Apply media padding to Gallery video demo (#13847)
Applies horizontal safe area insets to the video demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
2018-01-02 12:33:36 -08:00
Chris Bracken
e478a5472d
Apply media padding in Gallery Pesto demo (#13668)
Applies horizontal safe area insets to the Pesto demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
2017-12-19 09:15:26 -08:00
Chris Bracken
e85d099229
Apply media padding to Contacts demo (#13628)
Applies horizontal safe area insets to the Contacts demo in the Gallery.
This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
2017-12-15 19:10:18 -08:00
Chris Bracken
d8bfb3a99b
Apply media padding to Gallery Material Design demos (#13593)
Applies media padding (e.g. iPhone X safe area insets) to the Material Design demos in the Gallery.

Covers the following demos:
* Buttons (via the TabbedComponentDemoScaffold change)
* Cards
* Expansion panels
* Grid list
* Icons
* Images (via the TabbedComponentDemoScaffold change)
* Page Selector
* Progress Indicator
* Scrollable tabs
* Selection controls (via the TabbedComponentDemoScaffold change)
* Snack bar
* Tabs
* Text fields
* Tooltips

Fixes #13594
2017-12-15 10:13:30 -08:00
Chris Bracken
dc9c95375f
Apply media padding in Color, Typography demos (#13592) 2017-12-14 18:32:41 -08:00
Chris Bracken
dd943fefe0
Apply media padding in Cupertino Navigation demo (#13585)
Adds safe areas around:
1. The body of the colour swatch view (tab 1)
2. The chat header (tab 2)
3. The chat bubbles (tab 2)
4. The 'Sign In' launcher button (tab 3)
2017-12-14 17:38:48 -08:00
Chris Bracken
8a77036b35
Center Shrine demo title with centerTitle (#13586)
Rather than use a Center widget, center the title using AppBar's
centerTitle property. This ensures the title is horizontally centred
with respect to the screen rather than centred in the space between the
leading and trailing app bar widgets, which are asymmetrical in Shrine.
2017-12-14 16:53:30 -08:00
xster
ecf5041807
Let translucent Cupertino bars have its scaffold children automatically pad their heights - second try (#13440)
* Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)

* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget

* review

* More docs and comments from #13317
2017-12-08 09:00:20 -08:00
Yegor
e3cf62bc5b
modernize corners & borders in animation demo (#13352) 2017-12-05 16:38:42 -08:00
xster
9db8966f94
Make drawer demo header not scroll away (#13337)
* Make drawer demo header not scroll

* Add test for gallery drawer demo and fix user accounts drawer header overflow
2017-12-05 11:58:03 -08:00
Sigurd Meldgaard
2352e31f4e
Video demo is unsupported on simulator (#13333)
* Video demo is unsupported on simulator

Display a message stating this.

* Address review
2017-12-05 13:39:24 +01:00
Sigurd Meldgaard
b46d79041a
Add spinner to loading video (#13330)
* Add spinner to loading video
2017-12-05 10:20:13 +01:00
xster
2d6f268df6 Revert "Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)" (#13317)
This reverts commit 5c4ffa13a6.
2017-12-01 21:18:36 -08:00
Sigurd Meldgaard
3a393249dc Gallery video demo (#13195) 2017-12-01 18:28:36 +01:00
Chris Bracken
7a4df90bfb
Extract Cupertino chat row class (#13288)
Extracts Tab2ConversationRow class that consolidates widget tree for a
chat message in the Cupertino navagation chat demo. This refactoring
simplifies adding SafeArea support to handle iOS 11 safe areas in a
followup patch.
2017-11-30 18:47:57 -08:00
xster
5c4ffa13a6
Let translucent Cupertino bars have its scaffold children automatically pad their heights (#13194)
* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget
2017-11-30 13:55:30 -08:00
Ian Hickson
4a4fa2a7c7
Cupertino RTL (#13273)
Fixes the remaining known issues with widgets supporting RTL.
2017-11-30 12:24:40 -08:00
amirh
fcdbdfb476
Move the Icons demo into a card, and refactor it to use a Table widget. (#13257)
This is in preparation for adding a second card with a demo for animated
icons.

Table refactor is just a cleanup (that also fixes an alignment bug).
2017-11-29 18:46:59 -08:00
amirh
a8f565eb43
Icons demo cleanup - set color in the icon theme, remove unused iconOpacity (#13255) 2017-11-29 16:02:39 -08:00
amirh
47b5c37f1a
Add Images demo to the gallery app. (#13141) 2017-11-28 18:17:11 -08:00
Devon Carew
bdbe53be01
remove unused constants (#13199) 2017-11-24 19:13:18 -08:00
Ian Hickson
2bda59a1fe
TabBar RTL (#13164) 2017-11-22 18:53:42 -08:00
Ian Hickson
2db0c25f82
Dismissible RTL (#13137)
Fix the dismissible demo in the gallery (make it actuall update when you pick something from its menu; give it a better affordance for resetting once you've dismissed everything).

Improve some docs.

Fix various flinging bugs with dismissible. Add tests for those cases.

Add a feature to flutter_test to support a drag-then-fling gesture (used by the flinging tests).
2017-11-22 15:20:15 -08:00
Greg Spencer
0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
xster
89405002bc
Add an iOS style demo to the gallery (#12651)
* Built first tab

* Small additions

* started tab 3

* Need color arithmetics

* tab 2 built

* finalize

* lint and tests

* review

* Reapply docs after rebase

* use color.computeLuminance

* linter

* nit
2017-11-03 08:50:29 -07:00
Greg Spencer
05e10633f2
Adding proper accommodation for textScaleFactor in chips, and StadiumBorder border. (#12533)
In order to allow chips to be properly drawn when they expand in size (without
using IntrinsicHeight), I needed a BoxDecoration shape that would be dependent
upon the rendered height of the widget. This seemed to be pretty generally
useful, so I added a new ShapeDecoration called StadiumBorder. It uses the
minimum dimension to adjust the BorderRadius of a rounded rect in the shape
decoration.

I also converted some uses of BoxShape to be case statements, updated the
chips to use the StadiumBorder decoration, and updated some of the metrics to match
the Material spec, as well as implementing lerping to and from StadiumBorder.
2017-11-01 19:37:02 -07:00
Phil Quitslund
d6a7d05a25 Fix typo in Calculator demo. (#12688) 2017-10-24 10:36:31 -07:00
Alexandre Ardhuin
1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Michael Goderbauer
f8a2bd20e9 Redesign Semantic Tree Compilation Algorithm (#12605)
* Oct 12 10:12am

* implicit_semantics_test.dart passes

* refactoring

* works in nice

* minor rename

* more doc comments

* to be explicit check better

* fix test

* ++

* ++

* semantics_9_test (BlockSemantics) and implicit_semantics_test are passing

* doc updates

* tiny refactor

* fix static errors in tests

* fix gesture detector

* ++

* ++

* geometry

* ++

* remove noGeometry

* revert test

* +

* all tests but scrolling/clipping pass

* clipping works

* scrolling halfway

* sliver tests pass

* ALL TESTS PASS

* SemanticsNode changed

* docs and tiny fixes

* card test

* more doc comments

* remove missed print

* more tests

* make test pass on Linux

* remove changes to intellij proj file

* review comments
2017-10-18 16:28:24 -07:00
Greg Spencer
e697e5523f Add large text switching to Gallery app. (#12443)
This lets us preview widgets in the gallery using small, normal, large, and HUGE text.

Added selections to the main drawer for these options. Defaults to "normal", obviously.
2017-10-13 21:44:24 -07:00
Adam Barth
6128f48c80 Switch SlideTransition over to using Offset (#12369)
Previously, we used `Alignment`, which was difficult to understand. Now,
we just use an `Offset` scaled to the child's size, which is much easier
to understand.
2017-10-02 23:30:14 -07:00
Adam Barth
0044ea2dbb Replace usage of FractionalOffset with Alignment (#12348)
Alignment will eventually replace FractionalOffset.
2017-10-02 00:06:24 -07:00
Ian Hickson
efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
Sarah Zakarias
a0e91bf9e8 Update Flutter Gallery to use new asset api for package assets (#12254) 2017-09-26 15:21:01 +02:00
Jason Simmons
6420c75f26 Handle cancellation of the date/time picker in the Gallery full screen dialog demo (#12248) 2017-09-25 13:59:05 -07:00
Yegor
f2d096010d Internationalize time numerals in the time picker and TimeOfDay (#12166)
* internationalize time numerals

* tests

* use foundation.dart instead of meta.dart

* address comments
2017-09-22 14:35:25 -07:00
Todd Volkert
11de1a516f Fix capitalization in gallery RegExp (#12035) 2017-09-11 12:56:38 -07:00
Alexandre Ardhuin
8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Jacob Richman
93a98327a8 Add Diagnosticable base class and add documentation. (#11458)
Add Diagnosticable base class and documentation
2017-08-03 09:49:44 -07:00
Jacob Richman
9f510ebdc9 Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode (#11359)
Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode.
2017-07-25 09:25:13 -07:00
Michael Goderbauer
792c98751f a11y fix for list_demo.dart (#11142)
* a11y fix for list_demo.dart

* fix semantics of persistant bottom sheet
2017-07-10 17:37:21 -07:00
Michael Goderbauer
0e1b652d53 Make Demos in flutter_gallery more accessible (#10832)
Remaining known issues are #10831 and #10830.
2017-06-20 11:09:57 -07:00
Hans Muller
40db1e4bc6 Added InputDecoration helperText, helperStyle (#10852) 2017-06-20 09:33:26 -07:00
gspencergoog
9f344b695d Adds prefix and suffix support to TextField, per Material Design spec. (#10675)
* Prefix and Suffix support for TextFields

* Adding Tests

* Removing spurious newline.

* Fixing a small problem with the test

* Review Changes
2017-06-13 19:17:04 -07:00
Ian Hickson
9ac16680d2 Analyze sample code (#10619) 2017-06-12 16:52:35 -07:00
Alexandre Ardhuin
1eaefe1837 more const for immutables (#10563) 2017-06-08 22:04:18 +02:00
Alexandre Ardhuin
7d71326363 apply prefer_asserts_in_initializer_list lint (#10540) 2017-06-07 21:39:47 +02:00
Ian Hickson
ccad2849e7 Docs for menus (#10396)
Also, clean up the menus code a bit.

Also, make it easier to write a PopupMenuEntry that has itself many
items (for example, the way Chrome's menu has icons in a row).
2017-05-31 10:48:49 -07:00
Ian Hickson
f50caddfbd Much work on the documentation (#10331)
Minor fixes throughout, e.g. removing trailing commas from the end of sample code expressions, changing headings to "sample code" more consistently, removing stale todos, fix typos in a private method name, minor grammar fixes, added some clarifications to CircularProgressIndicator, LinearProgressIndicator, CrossAxisAlignment, added some cross-references to various members, made it slightly clearer that layout algorithms are implementation details.

Clarified "elevation" throughout.

Added docs to InkResponse and InkWell.

Added sample code for: SliverAppBar, Card, ListTile, EdgeInsets, Row, Column, CustomScrollView, ListView, SliverFixedExtentList, and SliverGrid.

Fixes #10317.
Fixes #10316.
Fixes #10267. (sort of, see comment therein)
Fixes #9331. (sort of, see comment therein)
Fixes #9407. (sort of, see comment therein)
2017-05-26 17:15:09 -07:00
Ian Hickson
61c56ba15f Make Slider take up whatever space it has. (#10132)
Previously it was (arbitrarily?) set to 144.0 pixels wide.
2017-05-17 14:31:55 -07:00
Ian Hickson
6ffcadfa38 Remove the slider from the Icon demo page (#10134)
The slider never really made much sense and it violated UX guidelines.

https://github.com/flutter/flutter/issues/4147
2017-05-16 19:34:50 -07:00
stevemessick
cc91b159c0 Fix typo (#10111) 2017-05-16 10:19:21 -07:00
xster
81ec553fb6 More Cupertino dialog UI tweaks (#9960)
* is default

* hit target

* correct test name

* review note
2017-05-10 18:59:50 -07:00
Alexandre Ardhuin
9b56c1c58c enable always_put_control_body_on_new_line lint (#9950) 2017-05-10 09:41:55 +02:00
Alexandre Ardhuin
e4546584d1 enable always_require_non_null_named_parameters lint (#9948)
* enable always_require_non_null_named_parameters lint

* Update home.dart
2017-05-10 08:45:36 +02:00
Chris Bracken
60f5ae8e77 Add const non-null asserts where required (#9945)
Also includes minor doc fixes.
2017-05-09 21:15:42 -07:00
Hans Muller
1157812bb9 Added ExpansionTile and deprecated TwoLevelList et al (#9938) 2017-05-09 16:32:01 -07:00
Ian Hickson
3012cce146 Clean up Tween and friends. (#9858) 2017-05-08 10:42:06 -07:00
Hans Muller
a6eb0a3e38 Gallery animation demo back button update (#9853) 2017-05-08 10:13:13 -07:00
Hans Muller
3681aee5a4 Selectively enable page scrolling in the gallery animation demo (#9845) 2017-05-05 16:02:25 -07:00
Hans Muller
6d8930e4d6 Animation demo scrolling (#9804) 2017-05-04 11:13:36 -07:00
Hans Muller
cddf06cf26 Added scroll snapping to the gallery animation demo (#9710) 2017-05-03 16:35:28 -07:00
Kyle Bradshaw
b5671f1b22 Gallery Cupertino Dialog demo snackbar fix (#9764)
Fixes #9757
2017-05-03 12:29:45 -07:00
Jason Simmons
b586a97ad2 Enable physical model shadows (with animation) and change elevation to a double (#9756)
Fixes https://github.com/flutter/flutter/issues/9342
2017-05-03 12:11:01 -07:00
Ian Hickson
89856c0e5b Adjust the defaults behaviour of scroll views. (#9679)
* Adjust the defaults behaviour of scroll views.

Now, primary scroll views scroll by default. Others only scroll if necessary.

* apply suggested changes
2017-05-02 09:14:50 -07:00
xster
f65fea8e2e Create a text validator/formatter mechanism (#9535)
* Add a text formatter interface used by EditingText. Provide some default implementations.

* self nits

* Handle -1 selection offsets

* review notes

* simplify regular expression

* Add whitelisting formatters. Use a custom phone number formatter in text demo.

* review notes

* not being able to addAll(null) is pretty annoying

* review notes

* partial tests

* Add tests

* didn’t end up needing mockito

* move to services
2017-04-28 15:33:38 -07:00
Ian Hickson
36052e68dd BoxDecoration API changes: backgroundColor -> color et al (#9648)
backgroundColor -> color
backgroundImage -> image
BackgroundImage -> DecorationImage
2017-04-27 14:19:01 -07:00
Adam Barth
744c91265b Add NestedScrollView (#9640)
A NestedScrollView lets you implement patterns where you have a header, tabs,
and additional scrollers inside the tabs.

Fixes #8359
2017-04-27 12:29:40 -07:00
Jason Simmons
834c142d04 Fix the sizing of the image in Gallery/Contacts (#9625) 2017-04-27 11:32:53 -07:00
Alexandre Ardhuin
31828609dc add @required (#9579) 2017-04-25 08:59:43 +02:00
Adam Barth
c288c7064f Refactor scrolling code to prepare for nested scrolling (#9575)
This patch reworks some of the guts of scrolling to make it easier to
implement nested scrolling effects. The actually nested scrolling effect
will be included in a later patch.
2017-04-24 23:32:55 -07:00
Alexandre Ardhuin
83fce211a3 More const immutable classes (#9544)
* more widget const constructors

* prefer const constructors

* address review comments
2017-04-23 22:37:29 +02:00
Alexandre Ardhuin
9541848272 make @immutable const classes (#9532)
* make @immutable const

* fix build
2017-04-21 23:09:42 +02:00
Alexandre Ardhuin
03c54abd5f make some widgets const (#9477) 2017-04-20 08:59:05 +02:00
Hans Muller
92e40b5c45 Image color blend mode (#9486) 2017-04-19 17:46:00 -07:00
Hans Muller
1e4151691a Fix PageSelector, page selector gallery demo (#9448) 2017-04-18 14:15:32 -07:00
Chris Bracken
2480c4d448 Handle pluralisation in Cupertino button demo (#9420)
Also switches to single quotes for consistency with surrounding code.
2017-04-17 10:01:03 -07:00
Ian Hickson
bf017b79b3 Move Point to Offset (#9277)
* Manually fix every use of Point.x and Point.y

Some of these were moved to dx/dy, but not all.

* Manually convert uses of the old gradient API

* Remove old reference to Point.

* Mechanical changes

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'

* Mechanical changes - dartdocs

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'

* Further improvements and a test

* Fix minor errors from rebasing...

* Roll engine
2017-04-12 15:06:12 -07:00
xster
89a7fdfc56 Rename State.config to widget everywhere (#9273)
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
2017-04-10 18:32:24 -07:00
xster
4f258357c9 Fix lints (#9307) 2017-04-10 02:09:51 -07:00
xster
7ce1cfd48d AppBar automatically show a close button for dialogs (#9268)
* Wiring fullscreen dialog

* Make fullscreen dialog use the new API. Add tests

* Review notes

* Move field back up

* final
2017-04-10 01:05:25 -07:00
Adam Barth
f9ae22677a Improve cooperation between scale and drag gestures (#9298)
Now the scale gesture will accept if its focal point moves more than the pan
slop. This change lets it compete with a drag gesture (e.g., a containing scrol
view) in the same way that the pan gesture does.

Fixes #8735
2017-04-07 17:00:32 -07:00
Ian Hickson
3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Hans Muller
20e214fa71 Document the buildTransitions() method (#9182) 2017-04-04 17:18:16 -07:00
Jason Simmons
3000c8bb59 Distinguish canceling a route pop from bubbling the pop up to the next level (#9165) 2017-04-04 16:42:31 -07:00
Adam Barth
5d8bad74d2 Add more dartdocs (#9174) 2017-04-03 22:08:51 -07:00
xster
58ddde88f4 Make Cupertino page transitions match native behaviours (#9138)
* Moved stuff around yet

* Fix depedencies

* Add more dartdoc comments to packages

* Remove Cupertino dependency on material

* Removed mountain_view package and added page transition test

* Fix analyze warnings

* Remove commented code

* Partial solution. Still need to stop the animation on the previous page for modal

* Some review notes

* Move the cupertino back gesture controller’s lifecycle management back to its parent

* Reviews

* Add background color

* Directional curves, full screen transition

* Don’t perform the exit animation if the incoming page is a dialog

* It works!

* Test structures

* Add a bunch of more tests and fix the gallery

* One more comment

* Review notes

* final controller

* Use that sweet sweet `is!` keyword

* Play golf, because I’m bitter that there’s no nullable `as` or something in dart

* Remove a space

* Review notes

* Remove the last deprecated test
2017-04-03 12:44:43 -07:00
Adam Barth
ae8994860e Rationalize text input widgets (#9119)
After this patch, there are three major text input widgets:

 * EditableText. This widget is a low-level editing control that
   interacts with the IME and displays a blinking cursor.

 * TextField. This widget is a Material Design text field, with all the
   bells and whistles. It is highly configurable and can be reduced down
   to a fairly simple control by setting its `decoration` property to
   null.

 * TextFormField. This widget is a FormField that wraps a TextField.

This patch also replaces the InputValue data model for these widgets
with a Listenable TextEditingController, which is much more flexible.

Fixes #7031
2017-04-01 17:30:21 -07:00
Alexandre Ardhuin
2de61a0853 add @required when there's an assert not null (#9124)
* add @required when there's an assert not null

* address review comments
2017-03-31 18:34:13 +02:00
Alexandre Ardhuin
4c530d5e8c prefer_final_fields (#8967) 2017-03-29 21:21:46 +02:00
Hans Muller
9192f67252 Shrine gallery demo: support for landscape layout (#9025) 2017-03-27 15:07:24 -07:00
Hans Muller
606f56221b Eliminated DrawerItem, use ListTile instead (#8992) 2017-03-24 15:34:43 -07:00
Hans Muller
49f5fbb809 Tweaked the appaearance of the cards demo (#8964) 2017-03-24 10:21:59 -07:00
Alexandre Ardhuin
578ca0a295 use color.shadeXxx instead of color[Xxx] (#8932)
* use color.shadeXxx instead of color[Xxx]

* remove calls to .shade500 on MaterialColor

* remove calls to .shade200 on MaterialAccentColor

* fix test
2017-03-21 23:14:55 +01:00
Adam Barth
269538df58 Add a constant for padding in a Material ListView (#8918)
Fixes #8235
2017-03-20 16:18:41 -07:00
Adam Barth
97816e1571 Rename Dismissable to Dismissible (#8919)
The latter is the proper spelling.

Fixes #8883
2017-03-20 16:17:08 -07:00
Hans Muller
031e042eee Now each Colors.foo constant is-a Color and a color swatch (#8833) 2017-03-17 15:24:54 -07:00
Adam Barth
5cf04b6141 Rename ImageFit to BoxFit (#8871)
This machinery is useful for arbitrary boxes (e.g., with FittedBox).

Fixes #6463
2017-03-17 15:21:55 -07:00
Alexandre Ardhuin
a0769f2488 apply the upcoming rule unnecessary_this (#8838) 2017-03-17 08:05:42 +01:00
Alexandre Ardhuin
2166ea5b7f apply partially the upcoming unnecessary_lambdas (#8810) 2017-03-15 23:09:58 +01:00
Alexandre Ardhuin
a9ba0e2f88 prefer_initializing_formals (#8797) 2017-03-15 18:30:55 +01:00
Adam Barth
fd51093146 Rename SliverPadding.child to SliverPadding.sliver (#8757)
The new name follows the pattern of the name suggesting which layout
protocol the parent expects the child to speak.

Fixes #8664
2017-03-14 14:07:13 -07:00
Hans Muller
859da8d28b Rename ListItem to ListTile, document ListTile fixed height geometry (#8769) 2017-03-14 11:46:30 -07:00
Alexandre Ardhuin
16d800b204 normalize setter format (#8708) 2017-03-10 21:52:30 +01:00
Alexandre Ardhuin
6a2148dde9 prefer const constructors (#8594)
* prefer const constructors

* fix double throw
2017-03-08 14:58:14 -08:00
Alexandre Ardhuin
ce734e8f24 apply the upcoming rule : directives_ordering (#8582) 2017-03-08 14:58:09 -08:00
Alexandre Ardhuin
329e52c02c apply upcoming rule use_collection_literals_when_possible (#8649) 2017-03-08 14:57:31 -08:00
Hans Muller
44dbecc6be Animation Demo performance tweaks (#8586) 2017-03-06 11:06:05 -08:00