401 Commits

Author SHA1 Message Date
Hans Muller
fc83640c88 ClampOverscrolls clamps Scrollable, not its Viewport (#5909) 2016-09-21 11:32:19 -07:00
Matt Perry
c9b08aa686 Fix a bug with how ScrollableGrid deals with padding. (#5963)
It wasn't taking padding into account when deciding which children were
visible. I modeled the solution off of the way ScrollableList handles
this.

Fixes https://github.com/flutter/flutter/issues/5522
2016-09-21 13:29:35 -04:00
Lex Berezhny
9f5eeb1bee Unittest to check Input box initial value (#5976)
Adds unit test to verify the initial value of Input widgets.
2016-09-20 20:13:30 -07:00
Hans Muller
aa9aaf2eb7 Restore Flutter gallery license page scrolling (#5934) 2016-09-20 15:13:50 -07:00
Adam Barth
51960b4482 Complete dartdocs for material/material.dart (#5941) 2016-09-20 14:44:11 -07:00
Ian Hickson
4f0eff31bc Fix crash when a RenderObject tree is rooted in a non-RenderObject environment (#5933) 2016-09-20 14:14:05 -07:00
Hans Muller
63828aab23 Underflowing LazyBlock should relayout for additional children (#5956) 2016-09-20 11:15:23 -07:00
Adam Barth
17ac73890e Add MediaQuery.textScaleFactor (#5936)
This feature is the implementation of an accessibility feature that changes the
size of text by a constant factor.

Fixes #5873
2016-09-20 09:14:48 -07:00
Adam Barth
e04135e983 Change the definition of MainAxisSize (#5931)
This property now applies only to the free space in the flex layout (i.e.,
minimize or maximize the amount of free space). Previously, the flexible
children were always allocated a size of zero when MainAxisSize was min. Now
they're allocated the same size that would be if the MainAxisSize was max.
2016-09-19 15:04:58 -07:00
Dragoș Tiselice
14054646ca Added Material steppers. (#5765)
Added a widget that gives fine control over the use of steppers.
At any single moment, one step is shown with it own controls and
content.
2016-09-16 13:22:15 -07:00
Adam Barth
3ed4960b16 Add FlexFit.loose (#5908)
Previously, flexible children were always required to fill their allocated
space. After this change, they can fit loosely into that space and not fill it.
When that happens, the remaining free space is allocated according to the
maixAxisAlignment.

Fixes #5858
2016-09-16 13:12:36 -07:00
Dragoș Tiselice
87fb075fa1 Renamed DropDown to Dropdown. (#5897)
Fixes #3208.
2016-09-15 17:38:41 -07:00
Dragoș Tiselice
8ac14f8698 Replaced FlexDirection with Axis. (#5896)
Fixes #4618.
2016-09-15 15:23:37 -07:00
Dragoș Tiselice
4259266b14 Renamed expansion panel file. (#5884)
Renamed expansion_panels.dart to expansion_panel.dart.
2016-09-15 14:16:05 -07:00
Adam Barth
179ea4a0a6 Update framework to account from engine API changes (#5887)
The engine now reports coordinates in physical pixels.
2016-09-15 13:13:42 -07:00
Ian Hickson
33794d1387 TextStyle.apply (#5879)
Also, fix an old TODO, and add a test of various things on TextStyle.

...requires an engine roll to pick up https://github.com/flutter/engine/pull/3025 and https://github.com/flutter/engine/pull/3027.
2016-09-15 07:49:44 -07:00
Ian Hickson
bb4a2e8b4c Implement detachChild for LayoutBuilder (#5860)
Fixes https://github.com/flutter/flutter/issues/5840
2016-09-15 07:47:15 -07:00
Hans Muller
4ec5144427 Scrollable should restore its viewport dimensions when it reappears (#5862) 2016-09-14 11:08:07 -07:00
Dragoș Tiselice
826d87a9b2 Made MergeableMaterial dividers animated seamlessly. (#5857)
Changed MergableMaterial to animated between states that have dividers
and those that don't in order not to have dividers that appear
unanimatedly. Fixes #5847.
2016-09-14 10:46:49 -07:00
Hans Muller
f4904b1459 Refresh indicator overscroll (#5836)
* Added OverscrollIndicatorEdge et al

* RefreshIndicator only clamps its scrollable edge

* added a test

* Updated the test

* fixed lint-os

* fixed a typo

* Scrollable should restore its viewport dimensions when it reappears

* removed an accidental commit

* updated per review feedback
2016-09-14 10:44:51 -07:00
Ian Hickson
36b093d628 This doesn't need a hack. (#5855) 2016-09-14 10:26:47 -07:00
Ian Hickson
6b93efdd85 Make dependenciesChanged fire after initState (#5810)
This allows us to simplify the logic around inherited widgets e.g. in
the Image widget.
2016-09-12 10:43:42 -07:00
Ian Hickson
03eaf1d16e Fix hot reload (#5799)
I forgot that it was possible for the root view to get marked dirty
without getting a new widget. This fixes that case to work.
2016-09-09 15:20:03 -07:00
Ian Hickson
5c4c1b8d65 Cleaning up minor issues (#5779)
I did a pass through some of the code cleaning minor things up.
2016-09-09 14:25:41 -07:00
Hans Muller
4d80f3cb30 Fix app bar title overflow with centerTitle:true (#5773) 2016-09-09 09:59:38 -07:00
Ian Hickson
5bc8888e7d Make tests more realistic (#5762)
Previously, pumpWidget() would do a partial pump (it didn't trigger
Ticker callbacks or post-frame callbacks), and pump() would do a full
pump. This patch brings them closer together. It also makes runApp run a
full actual frame, rather than skipping the transient callback part of
the frame logic. Having "half-frames" in the system was confusing and
could lead to bugs where code expecting to run before the next layout
pass didn't because a "half-frame" ran first.

Also, make Tickers start ticking in the frame that they were started in,
if they were started during a frame. This means we no longer spin a
frame for t=0, we jump straight to the first actual frame.

Other changes in this patch:

* rename WidgetsBinding._runApp to WidgetsBinding.attachRootWidget, so
  that tests can use it to more accurately mock out runApp.

* allow loadStructuredData to return synchronously.

* make handleBeginFrame handle not being given a time stamp.

* make DataPipeImageProvider.loadAsync protected (rather than private),
  and document it. There wasn't really a reason for it to be private.

* fix ImageConfiguration.toString.

* introduce debugPrintBuildScope and debugPrintScheduleBuildForStacks,
  which can help debug problems with widgets getting marked as dirty but
  not cleaned.

* make debugPrintRebuildDirtyWidgets say "Building" the first time and
  "Rebuilding" the second, to make it clearer when a widget is first
  created. This makes debugging widget lifecycle issues much easier.

* make debugDumpApp more resilient.

* debugPrintStack now takes a label that is printed before the stack.

* improve the banner shown for debugPrintBeginFrameBanner.

* various and sundry documentation fixes
2016-09-08 13:54:21 -07:00
Ian Hickson
99a9bbbe7c Add a test for 5630 (#5768)
This issue got fixed by a recent check-in, but I had a test specifically
for this incarnation so we should probably keep it just in case.

Closes https://github.com/flutter/flutter/issues/5630
2016-09-08 12:14:24 -07:00
Ian Hickson
1f15e06e45 Handle stateful widgets in layout builders. (#5752)
Previously, if a StatefulWidget was marked dirty, then removed from the
build, then reinserted using the exact same widget under a widget under
a LayoutBuilder, it wouldn't rebuild.

This fixes that.

It also introduces an assert that's supposed to catch SizeObserver-like
behaviour. Rather than make this patch even bigger, I papered over two
pre-existing bugs which this assert uncovered (and fixed the other
problems it found):

   https://github.com/flutter/flutter/issues/5751
   https://github.com/flutter/flutter/issues/5749

We should fix those before 1.0 though.
2016-09-07 14:45:19 -07:00
Dragoș Tiselice
691c25faca Renamed Step curve to Threshold. (#5755)
In the interest of using the name in the case of Material steppers,
this commit renames Step curve to Threshold.
2016-09-07 13:58:04 -07:00
Matt Perry
e47a421e42 Use slide-from-right transition only when doing back gesture
This eliminates all the issues around the horizontal page transition. I also improved the back gesture animation, and added fling support.

BUG=https://github.com/flutter/flutter/issues/5678
BUG=https://github.com/flutter/flutter/issues/5622
2016-09-07 13:34:50 -04:00
Dragoș Tiselice
dcda3d5ed8 Fixed a bug related to AnimtedCrossFade. (#5730)
Fixed a bug where the size of the AnimatedCrossFade would always
start from the size of the first child, irrespective of the
initial crossFadeState argument.
2016-09-02 16:41:09 -07:00
Ian Hickson
663596bc54 Handle GlobalKey reparenting inside LayoutBuilder (#5673) 2016-09-01 11:54:42 -07:00
Matt Perry
3732d754ca Re-enable iOS back gesture. (#5680)
The iOS transition is the more buggy part of this feature, and it wasn't
disabled. Let's just leave them enabled while I work on improvements.
2016-09-01 13:22:22 -04:00
Dragoș Tiselice
0fbe3ce92c Added AnimatedCrossFade. (#5650)
Added a widget that cross fades two children while animating the
size of the parent based on the children's interpolated sizes.
2016-08-30 15:02:36 -07:00
Matt Perry
1a87d4b82c Disable back gesture behind a flag until it's ready. (#5646)
Also added a regression test for the back gesture on iOS and android.
2016-08-30 16:17:31 -04:00
Hans Muller
f6353b686d Image should handle InheritedWidget ancestor changes (#5656) 2016-08-30 08:51:28 -07:00
Hans Muller
c76decb842 Update Scrollable scrollBehavior when ScrollConfiguration changes (#5647) 2016-08-29 14:36:53 -07:00
Ian Hickson
ea6bf4706a Fix the losing of state when pushing opaque routes (#5624)
Fixes https://github.com/flutter/flutter/issues/5283

Other changes in this patch:

Rename OffStage to Offstage.
Fixes https://github.com/flutter/flutter/issues/5378

Add a lot of docs.

Some minor punctuation and whitespace fixes.
2016-08-29 11:28:37 -07:00
Ian Hickson
dd2251ecf5 Fix some hero observer bugs (#5633)
1: If a route is already dismissed when it's popped, there's no point
trying to animate heroes, because it's going to be gone before the
heroes code can look at it.

2: If a hero animation finishes just as a new one is starting, we
previously blew away the state for the starting one. Now we correctly
segregate the "starting up quest" variables from the "actively ongoing
quest" variables.
2016-08-29 10:35:18 -07:00
Hans Muller
d0e72d616b Prevent looking up inherited widget values from initState() (#5609) 2016-08-26 15:19:46 -07:00
Dragoș Tiselice
b8980aeb35 Added expansion panels. (#5523)
Added ExpansionPanel and ExpansionPanelList. The implementation
is based on the Material design spec, without enforcing every
facet of it, leaving the developer using this the liberty to
enforced it lower down the widget tree. This decision was made
based on the argument that implementing more of the spec would
reduce flexibility to a point where some design would not be
implementable with this widget anymore.
2016-08-26 14:27:18 -07:00
Ian Hickson
934189d02d don't clear the dirty bit of an inactive node (#5614)
Fixes https://github.com/flutter/flutter/issues/5588
2016-08-26 13:32:17 -07:00
Hans Muller
310a981912 Handle dragging a bottom sheet past the bottom (#5541) 2016-08-23 15:56:49 -07:00
Dragoș Tiselice
e382701a9f Changed ExpandIcon to accept default state. (#5521)
Changed the ExpandIcon constructor to take a default expansion state.
If the widget gets rebuilt with a different expansion value, the
animation will trigger but the callback will not.
2016-08-22 12:54:16 -07:00
Hans Muller
da34ae654f Ease Material route animations redux (#5509) 2016-08-19 17:18:42 -07:00
Bob Nystrom
9efb168521 Fix an incorrect covariant function type. (#5492)
The type of rejects should be List<dynamic> to match the type that
DragTarget expects. Since the function doesn't use rejects anyway,
there's no need to tighten the type.

Fixes one of the strong_mode_static_type_error errors that is currently
being ignored.
2016-08-18 17:14:52 -07:00
Dragoș Tiselice
6e9bbca401 Added AnimatedSize. (#5260)
Added a widget that implicitly animates the size of it child.
2016-08-18 11:03:21 -07:00
Dragoș Tiselice
7bd4b5a9ab Added ExpandIcon widget. (#5463)
Added a widget that automaitcally rotates the expansion icon and
offers a callback interface that captures presses.
2016-08-18 09:27:29 -07:00
Dragoș Tiselice
77a1719cfb Changed IconButton not to exceed its splash size. (#5366)
Using IconButton inside of a bigger Material before would result
in having a hit box as large as the whole Material. This commit
constrains the size of the hit box and splashes to the default
diameter of a splash.
2016-08-18 09:26:03 -07:00
Adam Barth
a60fefc131 Improve test coverage (#5473)
These tests should hit some previously untested lines.
2016-08-17 18:18:07 -07:00