176 Commits

Author SHA1 Message Date
Natalie Sampsell
345d939ee8
Add showCupertinoDialog and showGeneralDialog (#20152) 2018-08-08 10:31:07 -07:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec6752af992d3db0265cf04cc90bfd13.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
matthew-carroll
a4599b02e3
Add doc example to addLocalHistoryEntry in LocalHistoryRoute (#9392) (#18124)
* Add doc example to addLocalHistoryEntry in LocalHistoryRoute (#9392)
2018-06-20 00:58:40 +00:00
Ian Hickson
aba0379dcc
Clean up the existing Navigator API. (#15718)
This is not a grand refactor yet, it's just cleaning up what we have
already, so that people who keep using this API (e.g. dialogs) have
something coherent to deal with.

The major changes are that Navigator and NavigatorState have the same
API now, that most of the examples use `<void>` instead of `<Null>`,
that the navigator observer can see replaces, and that the `settings`
is moved from ModalRoute to Route. I also cleaned up some of the API
documentation.
2018-03-22 13:21:07 -07:00
Alexandre Ardhuin
cc1cf9e12a
apply upcomming lint avoid_renaming_method_parameters (#15526) 2018-03-20 12:53:41 +01:00
xster
85d42fb396
Wrap route transitions above the transition as well to prevent repaints (#15534) 2018-03-14 18:37:53 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Volodymyr Lykhonis
467daba419 RouteObserver supports multiple RouteAware per Route. (#13757)
Unsubscribe should remove RouteAware for all routes.
2018-01-05 12:52:43 -08:00
Ian Hickson
4e2f77745f
Miscellaneous documentation improvements (#13719)
This is a collection of fixes I've run into recently.
2017-12-21 15:02:21 -08:00
Michael Goderbauer
f9cf5a1f3d
Add a11y label to modal barrier (#13543) 2017-12-14 15:03:51 -08:00
Adam Barth
6128f48c80 Switch SlideTransition over to using Offset (#12369)
Previously, we used `Alignment`, which was difficult to understand. Now,
we just use an `Offset` scaled to the child's size, which is much easier
to understand.
2017-10-02 23:30:14 -07:00
Adam Barth
2b126bcd0d Add Alignment, which will replace FractionalOffset (#12342)
Unlike FractionalOffset, Alignment uses the center as the zero of the
coordinate system, which makes the RTL math work out much cleaner.

Also, make FractionalOffset into a subclass of Alignment so that clients
can continue to use FractionalOffset.
2017-10-01 23:06:18 -07:00
Ian Hickson
9909e773dc More documentation fixes (#12290) 2017-09-28 16:43:33 -07:00
Ian Hickson
02c214479f CupertinoPageRoute cleanup (#11473) 2017-08-07 16:55:37 -07:00
Jacob Richman
93a98327a8 Add Diagnosticable base class and add documentation. (#11458)
Add Diagnosticable base class and documentation
2017-08-03 09:49:44 -07:00
Ian Hickson
58a28a2965 Improve some docs around WillPopScope. (#11429)
...and break the navigator<->routes circular dependency.

This is a step towards fixing https://github.com/flutter/flutter/issues/9577 but doesn't yet do so.
2017-07-28 15:10:11 -07:00
Jacob Richman
9f510ebdc9 Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode (#11359)
Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode.
2017-07-25 09:25:13 -07:00
Ian Hickson
dd40d0e29c Modal barrier shouldn't paint when the route is offstage. (#11347)
Fixes https://github.com/flutter/flutter/issues/11323
2017-07-21 16:39:11 -07:00
Michael Goderbauer
8e38848203 Fix sample code and update docs (#11257)
* fix sample code

* review comments

* review comments

* document other members for extra bonus points
2017-07-20 14:26:52 -07:00
Michael Goderbauer
b619759133 Adds a RouteObserver (#11236)
* Adds a PageRouteObserver

Required for https://github.com/flutter/plugins/pull/174.
See also https://github.com/flutter/flutter/issues/11216.

* formatting fixes

* Make RouteObserver generic
2017-07-14 17:44:30 -07:00
Ian Hickson
0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Adam Barth
bd56c79767 Handle back during pushReplacement (#10016)
Previously, we would strand the old route in the overlay even though it had
been removed from the history.
2017-05-11 19:33:37 -07:00
Ian Hickson
127545a353 More doc fixes. (#9848) 2017-05-06 15:08:14 -07:00
Ian Hickson
c7469e005d Fix many dartdoc typos (#9822) 2017-05-04 19:54:06 -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
9541848272 make @immutable const classes (#9532)
* make @immutable const

* fix build
2017-04-21 23:09:42 +02:00
Hans Muller
d05d36101a Enforce didUpdateWidget() @mustCallSuper (#9421) 2017-04-17 10:35:00 -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
Hans Muller
20e214fa71 Document the buildTransitions() method (#9182) 2017-04-04 17:18:16 -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
Adam Barth
89aaaa9c32 Improve focus management (#9074)
We now have an explicit focus tree that we manage. Instead of using
GlobalKeys to manage focus, we use FocusNode and FocusScopeNode objects.
The FocusNode is Listenable and notifies when its focus state changes.

Focus notifications trigger by tree mutations are now delayed by one
frame, which is necessary to handle certain complex tree mutations. In
the common case of focus changes being triggered by user input, the
focus notificiation still arives in the same frame.
2017-03-31 13:10:37 -07:00
Adam Barth
97816e1571 Rename Dismissable to Dismissible (#8919)
The latter is the proper spelling.

Fixes #8883
2017-03-20 16:17:08 -07:00
Adam Barth
6b75ac3fde Rename dependenciesChanged to didChangeDependencies (#8767)
The new name matches the style guide. (The old name was just old and predated
the style guide.)

Fixes #8000
2017-03-14 11:21:53 -07:00
Alexandre Ardhuin
16d800b204 normalize setter format (#8708) 2017-03-10 21:52:30 +01:00
Chris Bracken
27e8cc3797 Declare locals final where not reassigned (#8564)
Covers lib/ in package:flutter.
2017-03-03 17:42:23 -08:00
Alexandre Ardhuin
69b6bb87d1 prefer_is_empty and prefer_is_not_empty (#8474) 2017-03-01 22:17:30 -08:00
Adam Barth
663862557b Factor WillPopScope out of Form (#8311)
This functionality is independently useful.

Fixes #8293
2017-02-21 14:40:13 -08:00
Adam Barth
6d4333410b Don't try to pop the initial route (#8307)
This functionality got lots somehow in the migration to maybePop.

Fixes #8258
2017-02-21 12:57:32 -08:00
Ian Hickson
83a4cf269f Port AppBar to Scrollable2 (#7996)
Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
2017-02-08 18:16:19 -08:00
Hans Muller
c08bac8335 Form needs to clean up its scopedWillPopCallback (#7936) 2017-02-07 14:49:15 -08:00
Hans Muller
e366c9691f protect the hasScopedWillPopCallback ModalRoute method (#7832) 2017-02-02 15:27:39 -08:00
Ian Hickson
0400107cdf Apply @required according to the rules, for all of widgets/* (#7730) 2017-01-30 20:10:44 -08:00
Hans Muller
8c5bee9405 Add Navigator.pushReplacement() and Navigator.pushReplacementNamed() (#7611) 2017-01-24 11:36:48 -08:00
Adam Barth
23361d5ab6 Improve Route lifecycle (#7526)
Previously the navigator wouldn't always call Route.dispose when it was
removed from the tree. After this patch, the navigator remembers popped
routes so that it can call dispose on them when it is removed from the
tree.

Also, improve some error messages around calling dispose() more than
once on routes and AnimationControllers.

Fixes #7457
2017-01-18 16:32:44 -08:00
Hans Muller
0ce9917fb2 Support for vetoing an attempt to pop the current route (#7488) 2017-01-18 11:04:18 -08:00