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.
* 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
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.
* 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.
* 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
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.
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.
* 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
Fixes#13743Fixes#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`).
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.
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.
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.
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.
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
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)
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.
* 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
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.
* 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
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).
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.
* 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
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.
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.
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.
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).
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)
* Adjust the defaults behaviour of scroll views.
Now, primary scroll views scroll by default. Others only scroll if necessary.
* apply suggested changes
* 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
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.
* 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
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
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
* 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
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