From 8ede83b8a00d52662c55e770aef830c329ee9218 Mon Sep 17 00:00:00 2001 From: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Thu, 14 May 2020 11:22:03 -0700 Subject: [PATCH] update initial route documentation (#57136) --- packages/flutter/lib/src/widgets/app.dart | 9 +++++---- packages/flutter/lib/src/widgets/navigator.dart | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 14c9970545..0c225b4726 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -404,10 +404,11 @@ class WidgetsApp extends StatefulWidget { /// Defaults to [Window.defaultRouteName], which may be overridden by the code /// that launched the application. /// - /// If the route contains slashes, then it is treated as a "deep link", and - /// before this route is pushed, the routes leading to this one are pushed - /// also. For example, if the route was `/a/b/c`, then the app would start - /// with the three routes `/a`, `/a/b`, and `/a/b/c` loaded, in that order. + /// If the route name starts with a slash and has multiple slashes in it, then + /// it is treated as a "deep link", and before this route is pushed, the + /// routes leading to this one are pushed also. For example, if the route was + /// `/a/b/c`, then the app would start with the three routes `/a`, `/a/b`, and + /// `/a/b/c` loaded, in that order. /// /// Intermediate routes aren't required to exist. In the example above, `/a` /// and `/a/b` could be skipped if they have no matching route. But `/a/b/c` is diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index 218172c84d..1ca6f7c2b7 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -2151,9 +2151,10 @@ class Navigator extends StatefulWidget { /// This is the default value of [onGenerateInitialRoutes], which is used if /// [initialRoute] is not null. /// - /// If this string contains any `/` characters, then the string is split on - /// those characters and substrings from the start of the string up to each - /// such character are, in turn, used as routes to push. + /// If this string starts with a `/` character and has multiple `/` characters + /// in it, then the string is split on those characters and substrings from + /// the start of the string up to each such character are, in turn, used as + /// routes to push. /// /// For example, if the route `/stocks/HOOLI` was used as the [initialRoute], /// then the [Navigator] would push the following routes on startup: `/`,