1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00
Files
samples/navigation_and_routing/lib/main.dart
John Ryan 35f1670098 Update Navigation and Routing sample (#851)
* Add duration parameter to FadeTransitionPage

* Use didChangeDependencies instead of didUpdateWidget

* Don't notify listeners if the path hasn't changed

* Update navigation sample WIP

* Use Link and RouteStateScope in settings screen

* update README

* use named parameters for Library.addBook()

* Make _handleAuthStateChanged synchronous

* add missing copyright headers

* Address code review comments

* Address code review comments
2021-07-12 14:22:53 -07:00

24 lines
810 B
Dart

// Copyright 2021, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:url_strategy/url_strategy.dart';
import 'src/app.dart';
void main() {
// Use package:url_strategy until this pull request is released:
// https://github.com/flutter/flutter/pull/77103
// Use to setHashUrlStrategy() to use "/#/" in the address bar (default). Use
// setPathUrlStrategy() to use the path. You may need to configure your web
// server to redirect all paths to index.html.
//
// On mobile platforms, both functions are no-ops.
setHashUrlStrategy();
// setPathUrlStrategy();
runApp(const Bookstore());
}