2185 Commits

Author SHA1 Message Date
Ian Hickson
07719ad5ba Improve error reporting (#4025)
Don't suggest filing an issue when we can definitively say that the
assertion in question was not thrown from within the flutter package.
Fixes https://github.com/flutter/flutter/issues/3812.

Put the stack trace first after the message, with more details below the
stack trace, since the stack is often very useful and the stacks are no
longer stupidly long.

Better document the 'rescheduling' feature, and improve the error
handling asserts when it is misused.
Fixes https://github.com/flutter/flutter/issues/3888.

Improve the wording around the stack dump for exceptions during
callbacks.

Improve the color and font size of messages in live tests.
Fixes https://github.com/flutter/flutter/issues/4018.
2016-05-18 16:39:27 -07:00
Adam Barth
69311c28ba Improve date picker fidelity (#4023)
This patch updates the date picker to match the new spec.

We're still missing a fade effect when scrolling from one month to
another and we're missing the landscape layout.

Fixes #3558
2016-05-18 16:01:47 -07:00
Adam Barth
c1dfbd274b Not every month begins on a Monday (#4004)
Also, clean up the DatePicker to use more modern technology, such as a
grid for displaying the days of the month.

Fixes #3976
2016-05-18 09:01:15 -07:00
Adam Barth
8294b96f94 Complete dartdocs for painting.dart (#4003) 2016-05-18 09:01:03 -07:00
Adam Barth
4e1108e742 Improve dartdoc comments for gestures.dart (#4000)
Also, make some previously private classes public for better
documentation.
2016-05-17 21:52:08 -07:00
Adam Barth
0dafe1a480 Add dartdoc to Tooltip (#3957)
Also, remove several unused configuration options and fix an animation
leak.
2016-05-17 16:02:12 -07:00
Adam Barth
0e8e8bbb24 Finish dartdoc for gestures.dart (#3994) 2016-05-17 15:39:46 -07:00
Ian Hickson
b803d187ca Catch async functions passed to setState(). (#3992) 2016-05-17 14:53:17 -07:00
Hans Muller
ee3db6e61a Tweaks (#3975)
* ScrollableBuilder tweaks
2016-05-17 12:27:13 -07:00
Adam Barth
e9fe39e5e5 Explicitly specify linear curves (#3973)
We now required the curve parameter for CurvedAnimation.
2016-05-17 11:15:58 -07:00
Adam Barth
355a1d8ecf Add some docs to gestures.dart (#3966)
Also, add some missing docs to http.dart and widgets.dart.
2016-05-17 11:14:15 -07:00
Adam Barth
fa22cf5337 Finish dartdocs for animation.dart and foundation.dart (#3963)
Everything now has dartdocs except one setter whose getter already has
docs.
2016-05-17 10:49:20 -07:00
Hans Muller
bec3fdefd1 Add a Scrollable builder, refactor ScrollableList, et al (#3950)
* Add a Scrollable builder, refactor ScrollableList, et al

* Add space between the dialog demo buttons

* removed vestigial code
2016-05-16 17:32:01 -07:00
Adam Barth
0f3bd3ae84 Speed up compositing by 5x (#3948)
According to the profile for the flow manual test, we're spending the vast
majority of our time recording timeline traces. This patch removes the timeline
traces, which greatly improves performance.

Also, optimize TransformLayer to avoid one matrix memcpy. I filed
https://github.com/google/vector_math.dart/issues/166 about an API that would
make this even faster.
2016-05-16 16:41:13 -07:00
Ian Hickson
7d2519f073 Make it easier to disable print throttling. (#3941)
This exposes the default throttling implementation, and an alternative
non-throttling implementation, of `debugPrint`.
2016-05-16 13:24:06 -07:00
Ian Hickson
3252701753 Make it possible to run tests live on a device (#3936)
This makes it possible to substitute 'flutter run' for 'flutter test'
and actually watch a test run on a device.

For any test that depends on flutter_test:

1. Remove any import of 'package:test/test.dart'.

2. Replace `testWidgets('...', (WidgetTester tester) {`
      with `testWidgets('...', (WidgetTester tester) async {`

3. Add an "await" in front of calls to any of the following:
    * tap()
    * tapAt()
    * fling()
    * flingFrom()
    * scroll()
    * scrollAt()
    * pump()
    * pumpWidget()

4. Replace any calls to `tester.flushMicrotasks()` with calls to
   `await tester.idle()`.

There's a guarding API that you can use, if you have particularly
complicated tests, to get better error messages. Search for
TestAsyncUtils.
2016-05-16 12:53:13 -07:00
Matt Perry
5fa6c0e9b0 Remove the unimplemented more option from the copy/paste toolbar. (#3934)
Remove the unimplemented `more` option from the copy/paste toolbar.

Punting this feature for the near time, so I'm removing the dead option
from the toolbar.
2016-05-16 15:18:28 -04:00
Adam Barth
9e7311fedf Add dartdocs to asset_bundle.dart (#3922)
Fixes #3077
2016-05-16 12:18:13 -07:00
Ian Hickson
c5ff156f24 Revert "Rename DefaultTextStyle constructor to explicit (#3920)" (#3930)
This reverts commit 55f9145ef4fb7a7f4b4738740d5848ff745ae076.

Turns out that this commit breaks apps that use the material library,
because of the _errorTextStyle DefaultTextStyle which has inherit:true.
Just setting it to false doesn't work, unfortunately, because then you
hit some sort of issue with merging that text style with others that
have inherit:true.
2016-05-16 11:08:07 -07:00
Adam Barth
a078994ac9 Remove last old-style asserts-with-string (#3923)
Use the FlutterError hotness instead.

Fixes #1290
2016-05-16 10:37:58 -07:00
Adam Barth
55f9145ef4 Rename DefaultTextStyle constructor to explicit (#3920)
To make it clear that this constructor requires an explicit style. Also
throw a descriptive error recommending the inherit constructor for
styles with the inherit bit set.

Fixes #3842
2016-05-16 10:35:35 -07:00
Devon Carew
4db64ace96 send debug events for flutter lifecycle events (#3903)
* send debug events for flutter lifecycle events

* remove the route event
2016-05-15 17:39:45 -07:00
Michael McLennan
baaa7a0370 Added performance instrumentation for compositing addToScene() calls (#3885)
* Added performance instrumentation for compositing addToScene() calls.

* Switched to non-callback versions of the Timeline API.

* Fixed Dart formatting nit.
2016-05-15 14:19:52 -07:00
Matt Perry
6fd7987b4b Text selection UI matches behavior on Android. (#3886)
- Handles appear with tap or long press.
- Toolbar appears with long press on text, or tap on handle.
- Correct toolbar items shown depending on context.
2016-05-13 14:30:53 -04:00
Hans Muller
7de612add0 Increase fling-sensitivity of scrollable tabs (#3897) 2016-05-13 11:07:09 -07:00
Matt Perry
03141c2cdd Use engine's getWordBoundary method when user selects a word. (#3851) 2016-05-12 15:31:01 -04:00
Phil Quitslund
616d9e2ea8 Merge pull request #3880 from pq/void_setters
Turn on `avoid_return_types_on_setters` and cleanup annotated setters.
2016-05-12 12:28:15 -07:00
Hans Muller
5bacc9f8e8 GridTileBar uses ellipsis, etc (#3881) 2016-05-12 12:27:49 -07:00
pq
e54196d7fc Turn on avoid_return_types_on_setters and cleanup annotated setters.
It's safe to remove the unneeded `void`s from setters since the blocking issues in the
`always_declare_return_types` lint have been fixed (https://github.com/dart-lang/linter/).  We can also safely flip the bit on  `avoid_return_types_on_setters`.
2016-05-12 11:45:30 -07:00
Adam Barth
cc2f8feedc Add asserts to DefaultTextStyle.inherit (#3844)
The context and child arguments are required.  We should assert that
they're non-null.

Fixes #3843
2016-05-11 18:25:56 -07:00
Hans Muller
5b3a4e5554 AppBar uses LayoutBuilder (#3871) 2016-05-11 15:05:01 -07:00
Matt Perry
e4342184be Use mojo clipboard service for copy/paste toolbar. (#3778)
* Use mojo clipboard service for copy/paste toolbar.

BUG=https://github.com/flutter/flutter/issues/1567
2016-05-10 13:40:55 -04:00
Adam Barth
36d437d6f2 Add support for TextOverflow.ellipsis (#3818)
Fixes #417
2016-05-09 15:57:16 -07:00
Hans Muller
4d8f38e538 Correct ListItem leading/trailing widget layout (#3820) 2016-05-09 15:23:47 -07:00
Chinmay Garde
aff752f802 mojo_client: Dont try to iterate over response headers if there aren't any. (#3811) 2016-05-09 12:53:09 -07:00
Adam Barth
40152c5593 We were looking for HapticFeedback in the wrong service bundle (#3797)
Fixes #3795
2016-05-09 10:28:43 -07:00
Adam Barth
ee903af03f Move TextAlign out of TextStyle (#3789)
TextAlign applies to a whole paragraph instead of applying to an individual
text span. This patch moves the property out of TextStyle and into a separate
property on Text and RichText.
2016-05-06 17:33:27 -07:00
Adam Barth
ac2c8fec34 Left-align contents of drop-down button (#3775)
Fixes #3759
2016-05-06 13:07:05 -07:00
Ian Hickson
4d9fdda759 Remove ModalPosition (for real)
It has no more clients.

Follow-up to #3734.

Fixes #2484
2016-05-06 09:46:51 -07:00
Adam Barth
2592f8f4b6 DropDownMenu should use ScrollableList (#3745)
Previously it used Block, which is less efficient for large numbers of items.
Also move the top margin out of the menu item to fix the baseline alignment of
the text.

Fixes #1615
2016-05-05 12:09:29 -07:00
Adam Barth
b357aa32ec More docs for PerformanceOverlay (#3749)
Fixes #3747
2016-05-05 12:09:23 -07:00
Adam Barth
2fbf11a77b Expose blurSigma (#3743)
Fixes #3741
2016-05-04 18:50:38 -07:00
Adam Barth
6a46bf2e45 Ensure that DropDownMenus are always onscreen (#3742)
This patch sizes the menu such that it is always on screen, but doesn't scroll
the menu to ensure that the currently selected item is always visible and on
top of the button. That will need to wait for a later patch.

Also, teach CustomPaint how to repaint animations more efficiently.

Fixes #3720
2016-05-04 17:13:15 -07:00
Adam Barth
a5eb4c04c7 Remove ModalPosition (#3734)
Clients of getPosition should just use a one-child custom layout delegate
instead.

Fixes #2484
2016-05-04 12:40:50 -07:00
Matt Perry
a5920c3d52 First pass at a material-style copy/paste toolbar. (#3698)
* First pass at a material-style copy/paste toolbar.

This mimics the toolbar you see when selecting text in an Android
material app. There's still more to do (like integration with the system
clipboard), but this seemed like a good stopping point.

BUG=https://github.com/flutter/flutter/issues/1567
2016-05-04 15:37:04 -04:00
Phil Quitslund
04e892a457 Merge pull request #3729 from pq/annotate_literals_2
More type annotations for literals.
2016-05-04 12:32:54 -07:00
Ian McKellar
b04670699e Fix case of 'GET' HTTP method. (#3732)
Fixes #3730
2016-05-04 12:24:04 -07:00
pq
8bc06aa9b3 More type annotations for literals.
The `flutter` package gets more types!

Follow-up from: https://github.com/flutter/flutter/pull/3727.
2016-05-04 10:10:08 -07:00
Ian Hickson
1e093701b7 Save some memory by only storing one copy of the animation object... (#3724)
Turns out we were storing the same object in the base class and the
subclass. For pretty much every AnimatedWidget subclass.
2016-05-03 23:49:35 -07:00
Adam Barth
7712e583a4 Add missing dartdocs from material.dart (#3709)
Making progress towards document all public APIs in material.dart. We're still
missing a few odds and ends (as well as missing docs in tabs.dart,
tooltip.dart, and two_level_list.dart).
2016-05-03 21:07:29 -07:00