tree: 564aeb6efa1fe15168fd2cf472e0a467a6d0868c [path history] [tgz]
  1. android/
  2. ios/
  3. lib/
  4. macos/
  5. test/
  6. web/
  7. .gitignore
  8. .metadata
  9. pubspec.yaml
  10. README.md
packages/go_router/example/README.md

Example Catalog

Get started

flutter run lib/main.dart

An example to demonstrate a simple two-page app.

Sub-routes

flutter run lib/sub_routes.dart

An example to demonstrate an app with multi-level routing.

Query parameters and path parameters

flutter run lib/path_and_query_parameters.dart

An example to demonstrate how to use path parameters and query parameters.

Named routes

flutter run lib/named_routes.dart

An example to demonstrate how to navigate using named locations instead of URLs.

Redirection

flutter run lib/redirection.dart

An example to demonstrate how to use redirect to handle a synchronous sign-in flow.

Asynchronous Redirection

flutter run lib/async_redirection.dart

An example to demonstrate how to use handle a sign-in flow with a stream authentication service.

Books app

flutter run lib/books/main.dart

A fully fledged example that showcases various go_router APIs.