2697 Commits

Author SHA1 Message Date
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
xster
b717963b43 Change Cupertino page transition box shadow to a simple custom gradient (#9673)
Creates another Decoration for drawing outside the decorated box with a gradient to emulate the shadow.

Lets the cupertino transition page's background be transparent.

Fixes #9321
2017-04-28 12:50:20 -07:00
Hans Muller
acf102be95 AnimatedList (#9649) 2017-04-28 11:37:36 -07:00
xster
3a0ce961ca lerp LinearGradient (#9628)
* Implement

* Don’t scale the fractional offsets since it’s easier to use

* review notes

* fix nit
2017-04-27 15:52:41 -07:00
Mikkel Nygaard Ravn
a33832617b Document channel message value conversions (#9635) 2017-04-28 00:04:51 +02:00
Ian Hickson
11fa80bb78 MediaQuery.of shouldn't give a default return value (#9596) 2017-04-27 15:02:59 -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
Jason Simmons
1d6a8249f8 roll engine (#9650) 2017-04-27 13:34:48 -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
Adam Barth
4bac259617 Shift more code to ScrollPosition (#9637)
Previously, ScrollPosition did not know about ScrollActivities. However, all
the concrete subclasses of ScrollPosition that we know about need to use
ScrollActivities, so they ended up with a bunch of delegate boilerplate code.

This patch teaches ScrollPosition about ScrollActivities but doesn't have any
opinion about how to start or interact with those activities.

This patch is more refactoring to prepare for nested and linked scrolling.
2017-04-27 10:30:53 -07:00
Adam Barth
2891772846 Refactor ScrollDragActivity into two pieces (#9629)
This will make it easier to implement nested scrolling.
2017-04-27 09:39:12 -07:00
Mikkel Nygaard Ravn
70ff50f929 Integration test for channel communication (#9621) 2017-04-27 08:44:28 +02:00
Todd Volkert
9558ac7d55 Assert that url is non-null in NetworkImage (#9626) 2017-04-26 21:35:58 -07:00
Ian Hickson
2e194d5b44 Allow ChangeNotifiers to be CustomPainters (#9584)
Fixes https://github.com/flutter/flutter/issues/7648
2017-04-26 14:30:20 -07:00
Adam Barth
0f900116f0 Rename Stack.sizing to Stack.fit (#9615)
The enum is called StackFit, so the property name "fit" makes more sense.
2017-04-26 11:12:38 -07:00
Hans Muller
3c3b003f8b Handle ListView item size changes that cause underflow (#9586) 2017-04-26 10:44:35 -07:00
Ian Hickson
596eb033c7 Loosen the constraints for Stack non-positioned children. (#9581)
Also:

 * Add three explicit sizing modes to Stack for non-positioned
   children: loose, expand, and passthrough. (All three are used.)

 * Fix a bug whereby layers would try to paint in the same frame as
   they were removed from layout (but not detached).

 * Fix a bug whereby Offstage wasn't properly marking the parent dirty
   when changing its sizedByParent flag.

 * Explicitly make Overlay expand non-positioned children.

 * Explicitly have InputDecoration pass through the constraints from
   its Row to its Stack children.
2017-04-25 15:06:02 -07:00
Ian Hickson
24b40d87d6 Make getVelocity never return null (#9583)
Fixes https://github.com/flutter/flutter/issues/8425
2017-04-25 12:23:43 -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
Ian Hickson
57648ba0e4 New Placeholder widget. (#9565) 2017-04-24 14:06:07 -07:00
Ian Hickson
3492350653 Remove Placeholder. It has no clients. (#9563) 2017-04-24 12:40:27 -07:00
Adam Barth
55f334681b FocusNode.requestFocus should show the keyboard (#9558)
This patch introduces the notion of a keyboard token, which generalizes the
logic in EditableText for distinguishing between gaining focus by default and
gaining focus because of an explicit use action.

Fixes #7985
2017-04-24 09:46:49 -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
ad496e142b enable lint overridden_fields (#9527)
* enable lint overridden_fields

* address review comment
2017-04-22 10:27:03 +02:00
xster
76ecb0b9a1 Remove InputField (#9520) 2017-04-21 14:12:14 -07:00
Adam Barth
a57018a4bb Add GridView.builder (#9522)
This constructor makes it easier to use a GridView with a builder
callback.

Fixes #8952
2017-04-21 14:09:53 -07:00
Alexandre Ardhuin
9541848272 make @immutable const classes (#9532)
* make @immutable const

* fix build
2017-04-21 23:09:42 +02:00
Adam Barth
1abb6f5d74 Explain why the Padding widget exists (#9523)
Fixes #5166
2017-04-21 14:09:35 -07:00
Adam Barth
930183916c Box/Sliver mismatches should have better error messages (#9525)
We now attempt to explain what went wrong.

Fixes #9509
2017-04-21 14:09:25 -07:00
Hans Muller
39d9bcdae8 ListView.Builder() handles appends when scrolled to the end (#9533) 2017-04-21 14:07:41 -07:00
Ian Hickson
df45aac166 Don't paint on unattached layers. (#9519) 2017-04-21 13:39:55 -07:00
Ian Hickson
a591628cab Reorganise the drag related gesture files. (#9487)
Move the Drag*Details classes into drag_details.dart.
Move the one-gesture drag recognizers into monodrag.dart.
Move Drag into drag.dart.

Adjust the comments to claim that Drag is used by other things than
MultiDragGestureRecognizer. (Right now this is a lie but it will
hopefully be true soon.)
2017-04-21 13:13:20 -07:00
Adam Barth
31b1964a23 Document that you can call runApp again (#9526)
This is such a fundamental property of the system that we forgot to
document it.

Fixes #6818
2017-04-21 09:32:32 -07:00
Alexandre Ardhuin
c794221f96 enable lint prefer_adjacent_string_concatenation (#9493) 2017-04-21 08:52:07 +02:00
Alexandre Ardhuin
35803c2297 comprehensive list of lints (#9330)
* comprehensive list of lints
* add comments to commented out lint
* fix unnecessary_this lints
* exclude prefer_final_fields
2017-04-20 09:38:57 +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
Jason Simmons
da7867be0e Request a layout when a paragraph's overflow mode is changed (#9485)
A change in overflow mode requires calculation of the text size and resetting
the overflow shader
2017-04-19 17:06:58 -07:00
Jason Simmons
a657428b5c Capture didExceedMaxLines after doing text layout with constraints (#9457)
Subsequent operations like debugAssertDoesMeetConstraints() may do layout
operations that alter _textPainter's state.

Fixes https://github.com/flutter/flutter/issues/9372
2017-04-19 16:04:47 -07:00
Chinmay Garde
9b90ec4846 Remove FadeTransition from _MountainViewFadeTransition. (#9472)
* Remove FadeTransition from _MountainViewFadeTransition.
* Update tests.
2017-04-19 15:12:40 -07:00
xster
3cf23fcb20 Remove deprecated (#9474) 2017-04-19 12:50:51 -07:00
Hans Muller
2366cf73bc Dimissing the system keyboard shouldn't defeat scrolling (#9470) 2017-04-19 11:10:34 -07:00
Ian Hickson
0252622869 Promote Layer to full AbstractNode status (#9456) 2017-04-19 10:04:58 -07:00
Adam Barth
7be9115a43 Deploy @immutable in more places (#9462)
Turns out we have many immutable classes.

Fixes #6892
2017-04-19 09:30:43 -07:00
Ian Hickson
a6a8d997a3 Some clean-up of the Heroes code (#9428) 2017-04-18 14:42:56 -07:00
Hans Muller
1e4151691a Fix PageSelector, page selector gallery demo (#9448) 2017-04-18 14:15:32 -07:00
Hans Muller
4906297c28 Scrollable TabBar shows initialIndex (#9402) 2017-04-18 13:11:35 -07:00
Ian Hickson
115a04765e Be more detailed in assert messages from _paintWithContext (#9409) 2017-04-18 12:29:36 -07:00
xster
8ed175411b Make Cupertino page transition elevation animated too (#9166)
* Make Cupertino page transition elevation animated too

* Rename and change physical model to a decorated box

* Tests

* Add a comment

* still need to handle null in the tween somewhere

* nits

* Tweens evaluate to the actual begin/end instances. Let them be non-null

* Rename no decoration to none
2017-04-18 11:27:21 -07:00