176 Commits

Author SHA1 Message Date
Alexandre Ardhuin
b5f328e37e
remove unnecessary string interpolations (#49622) 2020-01-31 18:30:21 +01:00
chunhtai
406d8f7f1e
Fix focus when popping pages (#49714)
Fixes the focus handling when popping pages so that when multiple pages are popped, the focus doesn't try to focus the interstitial pages.
2020-01-30 09:35:58 -08:00
chunhtai
de7da494a1
Navigator 2.0: Refactor the imperative api to continue working in the new navigation system (#44930) 2020-01-29 13:43:02 -08:00
Dan Field
fabeb2a16f
Revert string interp (#49602) 2020-01-28 07:56:51 -08:00
Alexandre Ardhuin
92cbaa3efe remove unnecessary string interpolations (#49352) 2020-01-23 20:43:01 -08:00
Dan Field
3e63411256 Avoid runtimeType.toString in toString overrides/debugLabels (#48607) 2020-01-14 16:43:01 -08:00
Shi-Hao Hong
db08afd07f Allow for customizable ModalRoute barrierTween (#48345) 2020-01-09 19:28:01 -08:00
Shi-Hao Hong
51e24a3561
Implement reverseTransitionDuration for TransitionRoute (#48274)
* Implement reverseTransitionDuration in TransitionRoute
2020-01-09 09:31:38 -08:00
Greg Spencer
fabf4e3d0d Reverse the sense of the terms snippet and sample. (#48254) 2020-01-08 15:28:02 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Alexandre Ardhuin
166d422b05
implicit-casts:false in flutter/lib/src/widgets (#45728)
* implicit-casts:false in flutter/lib/src/widgets

* address review comments

* address review comment
2019-12-04 09:43:54 +01:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Greg Spencer
245d1b51ce
Add macOS to TargetPlatform (#43457)
This PR adds TargetPlatform.macOS to the TargetPlatform enum. This allows us to begin implementation of some adaptive UI based on which target platform is desired.

I haven't updated the tests here, that will come in a follow-up PR.
2019-11-26 18:32:34 -08:00
Alexandre Ardhuin
fcb40a05bb
make some BuildContext methods generics (#44189)
* make BuildContext.{ancestorStateOfType,ancestorRenderObjectOfType,rootAncestorStateOfType} generic

* make BuildContext.inheritFromWidgetOfExactType generic

* make BuildContext.ancestorInheritedElementForWidgetOfExactType generic

* make BuildContext.ancestorWidgetOfExactType generic

* fix snippet

* bump scoped_model on temp version

* update names

* Revert "bump scoped_model on temp version"

This reverts commit d1fcbba028cdb07f44738d1652391692d1ea5ec0.

* address review comments

* fix ci

* address review comments

* repeat the deprecation notice

* fix uppercase

* use of recommanded deprecation syntax

* address review comment
2019-11-22 17:35:20 +01:00
Justin McCandless
9734754aad
CupertinoContextMenu (iOS 13) (#43918)
Adds the CupertinoContextMenu widget for iOS 13 support.
2019-11-05 07:55:54 -08:00
Brian Egan
2e41483384 Add "navigator" option to "showDialog" and "showGeneralDialog" (#42842) 2019-11-01 11:16:32 -07:00
Michael Goderbauer
07a09c4b70
Mark routes as opaque when added without animation (#43756) 2019-10-31 11:32:19 -07:00
Michael Goderbauer
ddca78b4b7
Fix memory leak in TransitionRoute (#42777) 2019-10-17 15:51:45 -07:00
Greg Spencer
dee7583908
Only dismiss dropdowns if the orientation changes, not the size. (#42482)
This changes the DropDownButton so that instead of dismissing itself when any metrics change occurs, it only dismisses itself when the orientation changes.

This gets around the fact that we can't currently have a dropdown and a text field on the same page because the keyboard disappearing when the dropdown gets focus causes a metrics change, and the dropdown immediately disappears when activated.

It still will cause the keyboard to jump up and down between controls, but that's a larger issue. At least now we can use the two together again.
2019-10-14 08:00:11 -07:00
Greg Spencer
1a7bb1f583
Added proper focus handling when pushing and popping routes (#40166)
The proposed change will change focus handling when pushing and popping routes so that the FocusScopeNode for the route receives focus when pushed, and that the FocusScopeNode in the navigator receives focus when the route is popped.

This means that the last setFirstFocus call on the scope is used to determine which control actually receives focus. When the focus scope receives focus, it traverses its children, trying to find a non-scope node that is the "first focus" of itself or a child node.

This is a breaking change, because the focus behavior has changed. If you push a route after this change, and had a 'first focus' set on a widget via FocusScopeNode.setFirstFocus, it won't currently receive focus immediately, but after this change it will. Similarly, if you pop a route after this change, the focus will go back to where it was before the route was pushed, which is correct, but different from what happens now.
2019-09-26 14:30:39 -07:00
Hans Muller
09073a08b8
Rebuild modal routes when the value of userGestureInProgress changes (#41150) 2019-09-24 16:03:31 -07:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Hans Muller
0f00f424fa
ModalRoutes ignore input when a (cupertino) pop transition is underway (#40466) 2019-09-16 08:02:04 -07:00
Todd Volkert
cb90617911
Revert "ModalRoute resumes previous focus on didPopNext (#33152)" (#33815)
This reverts commit 0f2254a5c334b2435167083b48e681f4fb18acd4.
2019-06-03 17:24:56 -07:00
Tong Mu
0f2254a5c3
ModalRoute resumes previous focus on didPopNext (#33152)
This PR changes ModalRoute so that, when the route on top of it is popped, it requests to focus on the last focus.
2019-05-31 14:15:20 -07:00
Greg Spencer
7775c23784
[Re-Land] Implement focus traversal for desktop platforms. (#31614)
This re-lands the Focus changes in #30040. Correctness changes in routes.dart, and removes the automatic requesting of focus on reparent when there is no current focus, which caused undesirable selections.

Addresses #11344, #1608, #13264, and #1678
Fixes #30084
Fixes #26704
2019-04-25 16:26:58 -07:00
Greg Spencer
590cc27b31
Revert "Implement focus traversal for desktop platforms, shoehorn edition. (#30040)" (#31461)
This reverts commit 4218c0bc38bc74a97b1b03d7b8b7f0ce32e29468.
2019-04-22 18:02:35 -07:00
Greg Spencer
4218c0bc38
Implement focus traversal for desktop platforms, shoehorn edition. (#30040)
Implements focus traversal for desktop platforms, including re-implementing the existing focus manager and focus tree.

This implements a Focus widget that can be put into a widget tree to allow input focus to be given to a particular part of a widget tree.

It incorporates with the existing FocusScope and FocusNode infrastructure, and has minimal breakage to the API, although FocusScope.reparentIfNeeded is removed, replaced by a call to FocusAttachment.reparent(), so this is a breaking change:

FocusScopeNodes must now be attached to the focus tree using FocusScopeNode.attach, which takes a context and an optional onKey callback, and returns a FocusAttachment that should be kept by the widget that hosts the FocusScopeNode. This is necessary because of the need to make sure that the focus tree reflects the widget hierarchy.

Callers that used to call FocusScope(context).reparentIfNeeded in their build method will call reparent  on a FocusAttachment instead, which they will obtain by calling FocusScopeNode.attach in their initState method. Widgets that own FocusNodes will need to call dispose on the focus node in their dispose method.

Addresses #11344, #1608, #13264, and #1678
Fixes #30084
Fixes #26704
2019-04-22 09:51:40 -07:00
xster
d166a8d81e
Make sure everything in the Cupertino page transition can be linear when back swiping (#28629) 2019-03-29 15:56:18 -07:00
Phil Quitslund
802eca29d2
set literal conversions (#27811) 2019-03-06 11:05:16 -08:00
Hans Muller
e8b87203c5
Handle Cupertino back gesture interrupted by Navigator push (#28756) 2019-03-04 11:42:00 -08:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Michael Goderbauer
d6c0f3388f
Drive-by fix for TODO (#28669) 2019-02-28 15:51:54 -08:00
Alexandre Ardhuin
5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
xster
8d0346a0ec
Handle back swipe completed->completed or completed->dismissed transitions (#27866) 2019-02-12 18:50:06 -08:00
Alexandre Ardhuin
ef276ffea5
format initializer list of constructors (#27111) 2019-01-29 21:47:16 +01:00
Alexandre Ardhuin
316d74f62d
fix indentation in doc comments (#25521) 2018-12-19 21:12:49 +01:00
Alexandre Ardhuin
e41f1463cd
make see also sections uniform (#25513) 2018-12-18 21:45:20 +01:00
Hans Muller
324f275981
TransitionRoute.canTransitionFrom,To() doc update (#25477) 2018-12-18 11:38:16 -08:00
Greg Spencer
a6e901130e
Convert existing '## Sample code' samples to '{@tool sample}...{@end-tool}' form. (#24077)
This converts existing ## Sample code samples to {@tool sample}...{@end-tool} form.

Also:
1. Fixed a minor bug in analyze-sample-code.dart
2. Made the snippet tool only insert descriptions if the description is non-empty.
3. Moved the Card diagram to before the code sample.
2018-11-07 20:35:10 -08:00
Yegor
4452bd0a6b
Revert "Revert "make LocalHistoryRoute a proper super-mixin (#23382)"… (#23482)
* Revert "Revert "make LocalHistoryRoute a proper super-mixin (#23382)" (#23430)"

This reverts commit 3bbb3082b89ada4b0c44396148f3c2de731d1c6d.

This relands the LocalHistoryRoute change. The analyzer bug has been fixed.

* mark dartdocs as flaky
2018-10-25 09:56:23 -07:00
Yegor
3bbb3082b8
Revert "make LocalHistoryRoute a proper super-mixin (#23382)" (#23430)
This reverts commit a3e0b0aee28038816e4a016feda14f9e87454bcf.

This change broke the analyzer during the dartdoc step.
2018-10-23 15:26:10 -07:00
Yegor
a3e0b0aee2
make LocalHistoryRoute a proper super-mixin (#23382) 2018-10-23 13:43:02 -07:00
Alexandre Ardhuin
f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Ian Hickson
6d134e0c86
Animation API improvements (#21540) 2018-09-23 00:43:05 -07:00
Alexandre Ardhuin
a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Michael Goderbauer
dda7382e49
Fix the the (#21732) 2018-09-14 12:42:20 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Alexandre Ardhuin
976cffa24d
lint unnecessary_new on samples (#21539)
* lint unnecessary_new on samples

* fix tests
2018-09-07 11:00:05 +02:00
Natalie Sampsell
96326d4743
CupertinoActionSheet (#19232)
Adding CupertinoActionSheet, showCupertinoModalPopup
2018-08-09 21:55:41 -07:00