4032 Commits

Author SHA1 Message Date
Ian Hickson
4a2217b3d2
Improve documentation regarding padding for dialogs. (#15399) 2018-03-19 16:42:50 -07:00
Ian Hickson
da27d674a4
Move dialogs when keyboard pops up (#15426)
Fixes #7032
2018-03-19 15:52:25 -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
Yegor
9c49255f3e
a11y: remove SemanticsSortOrder; sort locally only; semanticsOwner post-test check (#15537)
* a11y: remove SemanticsSortOrder; sort locally only; semanticsOwner post-test check

* update accessibility test framework

- default nextNodeId/previousNodeId to -1
- stop treating null as opt-out from value testing
- add `id`, `TestSemantics.root`, and `tags` to the suggested code in the TestSemantics failure message
- fix a small bug with raw string escaping
- update all tests accordingly

* fix sortKey doc

* prefer const over final
2018-03-18 22:18:52 -07:00
Ian Hickson
b494e71e36
Improve async builder docs (#15373) 2018-03-18 22:00:47 -07:00
Ian Hickson
42e4e16b47
Fix clipping in FittedBox (#15418)
Fixes https://github.com/flutter/flutter/issues/15410
2018-03-18 22:00:14 -07:00
Ian Hickson
6758b55c8d
Fix weird bug when switching text from errorText to helperText (#15390) 2018-03-18 21:54:03 -07:00
Jason Simmons
95fbd819fa
Place the transform and its children within the RenderFlow's opacity layer (#15543)
Fixes https://github.com/flutter/flutter/issues/15037
2018-03-16 10:37:01 -07:00
Mikkel Nygaard Ravn
340c68038a
Make standard codecs extensible (#15414) 2018-03-16 16:17:56 +00: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
600739d195
Fix "my be entered" should be "may be entered" typo (#15540) 2018-03-15 12:06:37 -07:00
xster
85d42fb396
Wrap route transitions above the transition as well to prevent repaints (#15534) 2018-03-14 18:37:53 -07:00
Conor Dockry
b0f7da9249 Choose default icon color based on theme brightness (#15450)
* Use theme for default icon color

Replaces hard-coded black.

* Better icon defaults for dark/light modes

* Add default case to silence warning
2018-03-14 16:01:38 -07:00
Hans Muller
b6cca3923a
Updated the gallery text fields demo (#15362) 2018-03-14 14:42:45 -07:00
Hans Muller
d671267a20
Increase hint text contrast ratio to 4.5 (#15504) 2018-03-14 12:15:21 -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
Jonah Williams
9a8b460209
change ThemeData.primaryColor to PrimarySwatch instead of PrimarySwatch[500] (#15265)
* change ThemeData.primaryColor to PrimarySwatch instead of PrimarySwatch[500]

* fix mismatched color in stock test case
2018-03-14 10:39:56 -07:00
Hans Muller
9a3b6c3b56
Text form field initial value (#15484) 2018-03-14 10:21:20 -07:00
Alexandre Ardhuin
7667db6362
apply upcomming prefer_const_declarations (#15498) 2018-03-14 06:24:49 +01:00
Greg Spencer
d28e9aa5c9
Add slider minimum interaction time (#15358)
This change makes the discrete slider show the value indicator for a minimum amount of time for any interaction (tap, drag).
2018-03-13 09:41:49 -07:00
Greg Spencer
fc96326b9c
Add neck stretch (#15445)
During the review, we determined that it would be good for the value indicator to stretch when the text scale was smaller, and the shrink when it was larger, to keep the value visible over the finger at small sizes, and closer to the finger at large sizes. This implements that change.
2018-03-12 20:28:34 -07:00
Chris Bracken
dc03398bc3
Avoid NPE in InkDecoration dispose (#15473)
Avoids a null pointer exception if dispose() is called on an
already-disposed InkDecoration.
2018-03-12 19:05:55 -07:00
Alexander Aprelev
2f8474f9aa
Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f. (#15444)
* Roll engine to b6df7a637498ca9beda1fa9cd7210e3202ea599f.

Changes since last roll:
```
b6df7a637 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771)
a6764dbd5 Add sources for Fuchsia target. (#4763)
2d5900615 [fuchsia] Remove unused header file. (#4769)
9717063b7 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768)
9a9814312 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)
e74e8b35c [async] Update includes of async headers to new path (#4760)
e2c4b2760 Use Dart 2 camel case constants in the engine Dart libraries (#4766)
9c1e48434 Updates for Fuchsia roll. (#4765)
14c940e27 Switch from fxl::Mutex to std::mutex (#4764)
debf82c0b Roll Garnet (#4759)
5bffdefbb Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761)
```
2018-03-12 15:44:25 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Hans Muller
33f9afd99c
Updated the BottomNavigationBar class doc (#15347) 2018-03-12 10:27:20 -07:00
Ian Hickson
7865d319ba
Factor out BorderSide creation for dividers (#15403)
This allows other code to get the same style without having to know exactly it is computed.
2018-03-11 13:01:00 -07:00
Ian Hickson
ded3905102
Various documentation improvements. (#15071)
For example, mention the icon used for the drawer menu in the docs (this helps people writing unit tests); add DefaultAssetBundle sample code.
2018-03-11 03:19:18 -07:00
Ian Hickson
48bb5b7926
Include opacity in FadeTransition logging (#15073) 2018-03-09 22:49:19 -08:00
Greg Spencer
7fab7f6d02
Adding edge avoidance, painting tests, general cleanup (#15078)
Fixed the real repaint problem the Slider had (missing addListener), and added tests for it.

Added GlobalKey reparenting test.

Added the ability for the value indicator to slide left and right to avoid falling off the edge of the screen.
It only shifts as much as it can without deforming, but even at large text scales, that is enough to keep the text on the screen.

Updated the formatting on theme_data.dart and others to use longer line length.

Also, removed a color tween that faded the value indicator in as it scaled, since that wasn't to spec.
2018-03-09 14:04:58 -08:00
Michael Goderbauer
3a40d0ee4e
Support SemanticsFlag for Header (#15255) 2018-03-09 13:32:01 -08:00
Michael Goderbauer
5d03a59379
Allow wrapping CheckBox in Semantics (#15259) 2018-03-09 10:37:59 -08:00
Jonah Williams
7d1ceb4080
Add Text.rich constructor to Text widget (#15317)
* add fromSpan constructor to Text widget and simple smoke test:

* change fromSpan to rich, clean up comments

* 'directly from' to 'with'

* make sure text styles are applied to either data or textspan. add diagnostic properties for span

* add expectation for text style to test case

* some work on diagnostics and docs
2018-03-09 09:57:17 -08:00
Jacob Richman
046c6d5f7f
Track which Widget objects were created by the local project. (#15041)
Make flutter test support the --track-widget-creation flag.
Add widget creation location tests. Tests are skipped when
--track-widget-creation flag is not passed.
2018-03-09 08:09:49 -08:00
Michael Goderbauer
a9e2781132
Do not do semantics for detached objects (#15320) 2018-03-08 22:33:46 -08:00
Michael Goderbauer
f002839d44
Better print-out of semantics tree (#15302) 2018-03-08 19:14:43 -08:00
Jason Simmons
6f5bcb97a4
Do not add spacing to the first child's width in RenderWrap line wrapping (#15272)
The first child fits on the line if the line can accomodate its width.
After the first child the line needs room for the child's width plus spacing.
2018-03-08 15:01:37 -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
Stefano Rodriguez
b944cd7187 Plug TextDirection into box_decoration background gradient (#14810)
* Plug TextDirection into box_decoration background gradient

* Add test
2018-03-08 11:00:21 -08:00
Jason Simmons
7358d59036
Dart2 typesafe invocation of IsolateConfiguration callback (#15267) 2018-03-08 10:08:59 -08:00
Jonah Williams
27df288568
RenderWrap.performLayout should take spacing into consideration (#15256)
* RenderWrap.performLayout takes should take spacing into consideration when deciding to move to next row/axis

* fix spacing in text

* remove dart:developer import

* remove extra line
2018-03-07 13:00:14 -08:00
xster
c2261a3a2c
Remove a mixin from RenderListWheelViewport that was never used (#14900) 2018-03-07 11:56:36 -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
Hans Muller
e1c38aa024
Enable aligning a dropdown button's width with its menu's width (#14849) 2018-03-06 17:37:27 -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
Michael Goderbauer
86be138d9c
Make BottomNavBar accessible (#15211) 2018-03-06 15:08:39 -08:00
Sarah Zakarias
3ecc2a4ed2
Url encode asset lookup key (#15171) 2018-03-06 09:24:31 +01:00
Yegor
e9c982c39f
[semantics]: minor docs & style clean-up (#15181)
* [semantics]: minor docs & style clean-up

* remove a
2018-03-05 17:01:42 -08:00
Jonah Williams
419fef3f8b
Check that State.initState and State.didUpdateWidget don't return Futures (#15183)
* add a debug check that the returned Type of State.initState and State.didUpdateWidget are not Futures

* add test to verify that async lifecycles throw FlutterErrors

* address some feedback, match implementation of setState check

* address feedback from hixie

* fix odd spacing in test
2018-03-05 15:59:18 -08:00
Hans Muller
6e13128f45
OutlineButton doc fixes (#15092) 2018-03-02 17:43:22 -08:00
Siva
beffcf1ba1
Fix incorrect generic type specification, causes a compilation error (#15049)
when a hot reload is done after modifying a component in the flutter
package.
2018-03-02 15:43:40 -08:00