Skip to content

Let MaterialApp override the initial route#6216

Merged
abarth merged 1 commit intoflutter:masterfrom
abarth:initial_route
Oct 5, 2016
Merged

Let MaterialApp override the initial route#6216
abarth merged 1 commit intoflutter:masterfrom
abarth:initial_route

Conversation

@abarth
Copy link
Contributor

@abarth abarth commented Oct 5, 2016

Fixes #6215

@abarth
Copy link
Contributor Author

abarth commented Oct 5, 2016

@Hixie @yjbanov

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but wondering if long-term we may end up with too many attributes on MaterialApp if we reexport them one-by-one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it more sense to take a Navigator instead of a subset of Navigator's attributes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaterialApp is supposed to be a one-stop shop for initializing the root of your app. If we add a Navigator argument, we'll make every app more complicated. I agree that it could be a problem if we spam too many properties onto this object... I'm not sure what else to do besides taking one more step down this path.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Navigator's properties aren't just passed through. For example, onGenerateRoute is hooked by MaterialApp, key is hooked by WidgetsApp.

Copy link
Contributor

@yjbanov yjbanov Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dart:ui import is prefixed with ui, so the link may need to be [ui.Window.defaultRouteName] to actually work. Or perhaps it should point to the ui.window variable instead of the ui.Window class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an import of Window to this file for the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd rather we didn't go down this route and just waited until we could do this actually at the dartdoc level.

@Hixie
Copy link
Contributor

Hixie commented Oct 5, 2016

LGTM but note that this feature is broken as designed. We need to fix initialRoute to actually push each subpart of the route so that the back button works right.

@abarth abarth merged commit 73ff419 into flutter:master Oct 5, 2016
@abarth abarth deleted the initial_route branch October 5, 2016 18:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 12, 2018
flutter/engine@e65beb8...6f459e2

git log e65beb8..6f459e2 --no-merges --oneline
6f459e2 Revert "Reapply "Some cleanups enabled by removing support for Dart 1" (flutter#6216)" (flutter/engine#6232)
0ded891 Roll src/third_party/skia 1b5ece0f06f4..e70aed7066c6 (1 commits) (flutter/engine#6231)
4057327 Roll src/third_party/skia bd6595544171..1b5ece0f06f4 (22 commits) (flutter/engine#6229)
838eb3d Improve performance of performance overlay by caching. (flutter/engine#6225)
7ac3345 Remove root_surface_transformation from PaintContext (flutter/engine#6213)
565a194 Flutter roll for Dart. (flutter/engine#6227)
9a173a8 Roll buldroot to a11c4fd (flutter/engine#6224)
51b26f6 Revert "Roll buildroot to eba79bb (flutter#6215)" (flutter/engine#6223)
7be4462 Roll src/third_party/skia 2bf7a7bcc67f..bd6595544171 (4 commits) (flutter/engine#6222)
54fe12b Roll src/third_party/skia 82bf31003c66..2bf7a7bcc67f (1 commits) (flutter/engine#6221)
35ddf87 Roll buildroot to eba79bb (flutter/engine#6215)
6ed00a8 Roll src/third_party/skia 5518e65d90d7..82bf31003c66 (1 commits) (flutter/engine#6220)
8d9e20c Roll src/third_party/skia 3c4d533d8ebd..5518e65d90d7 (1 commits) (flutter/engine#6219)
8f39cac Roll src/third_party/skia 7891994e89a3..3c4d533d8ebd (1 commits) (flutter/engine#6218)
e3133e0 Reapply "Some cleanups enabled by removing support for Dart 1." (flutter/engine#6216)
1fb01f3 Roll src/third_party/skia a2bc1ca21bbc..7891994e89a3 (9 commits) (flutter/engine#6217)
f19ee56 Roll freetype2 to 6581fd3e9c8645f01c0d51e4f53893f5391f2bf3 (flutter/engine#6214)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
goderbauer added a commit to goderbauer/flutter that referenced this pull request Sep 12, 2018
flutter/engine@6f459e2 Revert "Reapply "Some cleanups enabled by removing support for Dart 1" (flutter#6216)"
flutter/engine@0ded891 Roll src/third_party/skia 1b5ece0f06f4..e70aed7066c6 (1 commits)
flutter/engine@4057327 Roll src/third_party/skia bd6595544171..1b5ece0f06f4 (22 commits)
flutter/engine@838eb3d Improve performance of performance overlay by caching.
flutter/engine@7ac3345 Remove root_surface_transformation from PaintContext
goderbauer added a commit that referenced this pull request Sep 12, 2018
flutter/engine@6f459e2 Revert "Reapply "Some cleanups enabled by removing support for Dart 1" (#6216)"
flutter/engine@0ded891 Roll src/third_party/skia 1b5ece0f06f4..e70aed7066c6 (1 commits)
flutter/engine@4057327 Roll src/third_party/skia bd6595544171..1b5ece0f06f4 (22 commits)
flutter/engine@838eb3d Improve performance of performance overlay by caching.
flutter/engine@7ac3345 Remove root_surface_transformation from PaintContext
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define Navigator default route in MaterialApp constructor param?

3 participants