2633 Commits

Author SHA1 Message Date
Ian Hickson
2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
2017-04-12 13:33:02 -07:00
Jason Simmons
c12c019bcc Throw an exception with the asset key if a string asset load fails (#9325)
Fixes https://github.com/flutter/flutter/issues/7715
2017-04-11 13:48:04 -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
Yegor
a5593b1678 fix analyzer warning: use const where possible (#9320) 2017-04-10 14:20:47 -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
Kyle Bradshaw
55e51e798b Form.dart doc typo fixes (#9302)
Came across "can ve" while experimenting with Forms using VSCode and Dart Code. Glanced over the rest of the docs for typos while I was at it.
2017-04-08 10:39:01 -07:00
Ian Hickson
9350f2875d Fix some error message text typos. (#9294)
Also, add a specific message for BuildContext.size for RenderSlivers.
2017-04-08 00:32:02 -07:00
Alexandre Ardhuin
610955f81d upgrade to linter-0.1.30 (#9297)
* upgrade to linter-0.1.30

* add prefer_is_empty lint
* add directives_ordering lint
* add no_adjacent_strings_in_list lint
* add no_duplicate_case_values lint
* add prefer_collection_literals lint
* add prefer_const_constructors lint
* add prefer_contains lint
* add prefer_initializing_formals lint
* add unnecessary_null_aware_assignments lint
* add unnecessary_null_in_if_null_operators lint
2017-04-08 08:43:19 +02:00
xster
33997bb7bb Add some more details to implicit animation's dartdoc (#9292) 2017-04-07 18:40:06 -07:00
Ian Hickson
a6eeaa5e34 Fix some typos in icon_theme.dart (#9296) 2017-04-07 17:24:50 -07:00
Ian Hickson
ebe6da5b17 Rename BlockBody to ListBody. (#9291)
Nobody knew what a Block was.
2017-04-07 17:14:54 -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
Alexandre Ardhuin
8bcf302e23 use conditional assignment (#9252) 2017-04-07 21:41:17 +02:00
Ian Hickson
3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Ian Hickson
54bbb6fb4d SliverFill: s/size/extent/ as requested by abarth a while ago... (#9279) 2017-04-07 12:24:06 -07:00
Chris Bracken
a7a95daa52 Update TextEditingValue.selection on selection change (#9284)
Fixes a bug where tapping in the text under edit moved the cursor but
did not push the updated selection to the engine.

Adds a test for caret position updates.
2017-04-07 11:13:10 -07:00
Jason Simmons
e04376895d Handle tabs in rendering of licenses (#9264) 2017-04-06 13:11:06 -07:00
Adam Barth
470db7d96e TextField should update IME when controller changes (#9261)
Fixes #9246
2017-04-06 12:28:30 -07:00
David Yang
c96ab53b42 Allowing more flexibility to the active opacity of the Cupertino Button (#9071)
* Allowing overrides to the activeOpacity of the button

* adding tests

* fix

* fixing animation

* fixes

* moar fixes
2017-04-05 23:52:24 -07:00
Ian Hickson
9b5d1fbe1e Provide more widget const constructors. (#9247)
Still many more to go.
2017-04-05 23:39:07 -07:00
Adam Barth
93b90362fd Add more breadcrumbs in Notification docs (#9245)
Fixes #7519
2017-04-05 23:31:52 -07:00
Ian Hickson
2144a8964f Fill in the test for button color splash and highlights (#9224)
Fixes https://github.com/flutter/flutter/pull/8643

Fixes https://github.com/flutter/flutter/issues/8804 by adding a test
to verify that Material elevation changes animate.

Also tweak some dartdocs, add some trailing commas, improve some
toString output, make the inkwell test agnostic to the PhysicalModel
logic, and move the material buttons test to the material test
directory.
2017-04-05 22:46:58 -07:00
Adam Barth
954b35bf25 Add some more asserts to RenderFlex (#9209) 2017-04-05 22:46:43 -07:00
Ian Hickson
2f4835429b Better toStrings for Listenable subclasses (#9244) 2017-04-05 22:46:36 -07:00
Adam Barth
882c992b17 Add Wrap (#9225)
The Wrap widget is a layout that places children in a run in order along its
main axis until it runs out of space. At that point, starts placing children in
a new run that is adjacent in the cross axis.

Fixes #8831
2017-04-05 16:22:32 -07:00
Ian Hickson
1b948cbb85 Rename SliverFill to SliverFillViewport and add SliverFillRemaining (#9194) 2017-04-05 12:27:59 -07:00
Ian Hickson
a52c7b470d Update the examples/ README and associated fixes. (#9090)
This yak shave went as follows:

Fix https://github.com/flutter/flutter/issues/8795 by adding stocks to
the examples README.

Notice the layers entry in that README isn't quite right either.
Update that.

Check the layers/README file is worth pointing at.

Update the layers/README.

Let's run some of the layer tests to see if they still work.

Oops, need to update them to gradle.

Ok let's try running them again.

Oops, sector is broken.

Add a test for sector.

Fix sector. Find you need to add an assert to a const constructor.

Notice we need to turn const asserts on for the analyzer.

Notice the analysis_options files are out of sync with each other and
with the full list of lints.

Turn on the lints that should be on.

Fix the bugs that finds.
2017-04-05 11:28:33 -07:00
Adam Barth
af170c8e56 Add more dartdocs (#9183)
Mostly related to semantics and scrolling.
2017-04-04 22:41:24 -07:00
Ian Hickson
f46dd406c1 Add some breadcrumbs to RenderIgnorePointer/RenderAbsorbPointer (#9192) 2017-04-04 20:38:41 -07:00
Ian Hickson
8469ef03d8 Trivial tabs-related fixes (#9191)
Add some commentary around DefaultTabController.initialIndex.
Fix typo (nuull) in TabBar.
Make some asserts more detailed.
2017-04-04 20:38:29 -07:00
Ian Hickson
fbcade5900 Fix comment for defaultTargetPlatform (#9189) 2017-04-04 20:37:59 -07:00
Ian Hickson
cf991a3412 Code cleanup for physics (#9193)
* Add tolerance argument to FrictionSimulation.
* Change FrictionSimulation.through to setting tolerance
  via the constructor rather than afterwards.
* Allow SimulationGroup constructor to take tolerance argument.
* Add a toString for SpringDescription.
* Add a toString for SpringSimulation.
* Push this change to BouncingScrollSimulation.
2017-04-04 17:21:10 -07:00
Ian Hickson
dcd3833455 Turn and if != null into an elvis operator (#9190) 2017-04-04 17:20:43 -07:00
Hans Muller
20e214fa71 Document the buildTransitions() method (#9182) 2017-04-04 17:18:16 -07:00
Jason Simmons
d302213270 Gate the PhysicalModel shadows behind a flag (#9198)
Fixes https://github.com/flutter/flutter/issues/9186
2017-04-04 16:42:48 -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
xster
0cf2f88f00 Make Cupertino page transition linear during drag (#9167)
* Just realized the creation order is the other way around

* Works

* Revert previous partial solution

* Change pumpAndSettle to pump for gestures
2017-04-04 11:17:40 -07:00
Adam Barth
830d163c21 Add more dartdocs for slivers (#9164)
This patch adds docs for many of the sliver widgets.
2017-04-03 22:47:02 -07:00
Adam Barth
5d8bad74d2 Add more dartdocs (#9174) 2017-04-03 22:08:51 -07:00
Adam Barth
b564b4ccac Remove GlobalKey removal listeners (#9143)
These where used only by the old focus system. Let's remove them before
they grow more clients.
2017-04-03 21:12:47 -07:00
Adam Barth
d88ff90753 Defer to TextField in TextFormField docs (#9144)
TextFormField doesn't actually have many properties because it wraps a
TextField. Rather than trying to document all the arguments in the
constructor, we now refer to the docs for TextField, which explain the
parameters in a more readable way.

Fixes #7245
2017-04-03 20:58:32 -07:00
Adam Barth
f00b3a4b06 Remove ScrollBehavior.getGlowColor (#9145)
This method seemed overly specific to the needs of one particular
subclass. This patch duplicates some code but makes the API conceptually
cleaner.

Fixes #8267
2017-04-03 20:58:17 -07:00
Adam Barth
20015400f9 TextField centering should work in loose constraints (#9153)
We should always use the maxWidth from the incomming constraints to size the
text inside the editable because the EditableText itself always expands to fill
its width.

Also, make sure InputDecoration always expands horizontially (even when there's
no icon) for consistency.

Fixes #9149
2017-04-03 20:48:54 -07:00
Hans Muller
bb5351b7c2 AppBar looks up its scaffold with nullOk: true (#9160) 2017-04-03 15:27:37 -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
xster
c7f98efb63 Extract cupertino page transition out of material (#9059)
* 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

* Some review notes

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

* Reviews

* Add background color

* final controller

* Review notes
2017-04-03 12:17:39 -07:00
Adam Barth
210774f392 Make cursor blinking more efficient (#9142)
Rather than rebuilding to blink the cursor, we now pass a
ValueNotifier<bool> to the RenderEditable so that it can simply repaint.

This patch also contains some refactoring towards being able to do the
same thing with the text being edited, but I didn't quite get it
working.
2017-04-01 23:47:17 -07:00
Adam Barth
0b31c69963 Make it possible to center the text in a TextField (#9140)
Also, fix an issue where hint text wasn't visible when the
InputDecoration was collapsed.

Fixes #8541
2017-04-01 23:11:18 -07:00
Adam Barth
9946355ece Remove old, draft dartdoc 2017-04-01 19:12:41 -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