diff --git a/packages/go_router/README.md b/packages/go_router/README.md index 40a1319c7d47..b42e9348d330 100644 --- a/packages/go_router/README.md +++ b/packages/go_router/README.md @@ -38,6 +38,7 @@ See the API documentation for details on the following topics: - [State restoration](https://pub.dev/documentation/go_router/latest/topics/State%20restoration-topic.html) ## Migration Guides +- [Migrating to 18.0.0](https://flutter.dev/go/go-router-v18-breaking-changes). - [Migrating to 17.0.0](https://flutter.dev/go/go-router-v17-breaking-changes). - [Migrating to 16.0.0](https://flutter.dev/go/go-router-v16-breaking-changes). - [Migrating to 15.0.0](https://flutter.dev/go/go-router-v15-breaking-changes). diff --git a/packages/go_router/example/lib/async_redirection.dart b/packages/go_router/example/lib/async_redirection.dart index bf59ead30dfd..c47a8a08773e 100644 --- a/packages/go_router/example/lib/async_redirection.dart +++ b/packages/go_router/example/lib/async_redirection.dart @@ -4,8 +4,8 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; // This scenario demonstrates how to use redirect to handle a asynchronous // sign-in flow. diff --git a/packages/go_router/example/lib/books/main.dart b/packages/go_router/example/lib/books/main.dart index 10c13eefd0be..0f2482272c62 100644 --- a/packages/go_router/example/lib/books/main.dart +++ b/packages/go_router/example/lib/books/main.dart @@ -3,8 +3,8 @@ // found in the LICENSE file. import 'package:collection/collection.dart'; -import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'src/auth.dart'; import 'src/data/author.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/author_details.dart b/packages/go_router/example/lib/books/src/screens/author_details.dart index e3ced10e93bf..31aaf2b438b5 100644 --- a/packages/go_router/example/lib/books/src/screens/author_details.dart +++ b/packages/go_router/example/lib/books/src/screens/author_details.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import '../data.dart'; import '../widgets/book_list.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/authors.dart b/packages/go_router/example/lib/books/src/screens/authors.dart index c24f09d251df..bd836918ff64 100644 --- a/packages/go_router/example/lib/books/src/screens/authors.dart +++ b/packages/go_router/example/lib/books/src/screens/authors.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import '../data.dart'; import '../widgets/author_list.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/book_details.dart b/packages/go_router/example/lib/books/src/screens/book_details.dart index de781ae3631c..d572398b0fd6 100644 --- a/packages/go_router/example/lib/books/src/screens/book_details.dart +++ b/packages/go_router/example/lib/books/src/screens/book_details.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'package:url_launcher/link.dart'; import '../data.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/books.dart b/packages/go_router/example/lib/books/src/screens/books.dart index 3bee36aeff19..625e9d4afeb3 100644 --- a/packages/go_router/example/lib/books/src/screens/books.dart +++ b/packages/go_router/example/lib/books/src/screens/books.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import '../data.dart'; import '../widgets/book_list.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/scaffold.dart b/packages/go_router/example/lib/books/src/screens/scaffold.dart index 633fea090d75..099e4ae494ec 100644 --- a/packages/go_router/example/lib/books/src/screens/scaffold.dart +++ b/packages/go_router/example/lib/books/src/screens/scaffold.dart @@ -3,9 +3,8 @@ // found in the LICENSE file. import 'package:adaptive_navigation/adaptive_navigation.dart'; -import 'package:flutter/material.dart'; - import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// The enum for scaffold tab. enum ScaffoldTab { diff --git a/packages/go_router/example/lib/books/src/screens/settings.dart b/packages/go_router/example/lib/books/src/screens/settings.dart index 7b20c60493b1..79401ba90c55 100644 --- a/packages/go_router/example/lib/books/src/screens/settings.dart +++ b/packages/go_router/example/lib/books/src/screens/settings.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'package:url_launcher/link.dart'; import '../auth.dart'; diff --git a/packages/go_router/example/lib/books/src/screens/sign_in.dart b/packages/go_router/example/lib/books/src/screens/sign_in.dart index 07c0110b77af..ece4cdfc5903 100644 --- a/packages/go_router/example/lib/books/src/screens/sign_in.dart +++ b/packages/go_router/example/lib/books/src/screens/sign_in.dart @@ -2,7 +2,7 @@ // 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:material_ui/material_ui.dart'; /// Credential data class. class Credentials { diff --git a/packages/go_router/example/lib/books/src/widgets/author_list.dart b/packages/go_router/example/lib/books/src/widgets/author_list.dart index 1cfb22014e9e..77a4f588fa1e 100644 --- a/packages/go_router/example/lib/books/src/widgets/author_list.dart +++ b/packages/go_router/example/lib/books/src/widgets/author_list.dart @@ -2,7 +2,7 @@ // 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:material_ui/material_ui.dart'; import '../data.dart'; diff --git a/packages/go_router/example/lib/books/src/widgets/book_list.dart b/packages/go_router/example/lib/books/src/widgets/book_list.dart index 3c78b6655911..917397abaa78 100644 --- a/packages/go_router/example/lib/books/src/widgets/book_list.dart +++ b/packages/go_router/example/lib/books/src/widgets/book_list.dart @@ -2,7 +2,7 @@ // 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:material_ui/material_ui.dart'; import '../data.dart'; diff --git a/packages/go_router/example/lib/exception_handling.dart b/packages/go_router/example/lib/exception_handling.dart index e018f02aaab4..a4641761ead8 100644 --- a/packages/go_router/example/lib/exception_handling.dart +++ b/packages/go_router/example/lib/exception_handling.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This sample app shows how to use `GoRouter.onException` to redirect on /// exception. diff --git a/packages/go_router/example/lib/extra_codec.dart b/packages/go_router/example/lib/extra_codec.dart index a8e53f080e56..2f40bd365fdf 100644 --- a/packages/go_router/example/lib/extra_codec.dart +++ b/packages/go_router/example/lib/extra_codec.dart @@ -4,8 +4,8 @@ import 'dart:convert'; -import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This sample app demonstrates how to provide a codec for complex extra data. void main() => runApp(const MyApp()); diff --git a/packages/go_router/example/lib/go_relative.dart b/packages/go_router/example/lib/go_relative.dart index e2bbd23f3b73..840db82154ca 100644 --- a/packages/go_router/example/lib/go_relative.dart +++ b/packages/go_router/example/lib/go_relative.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This sample app demonstrates how to use go relatively with GoRouter.go('./$path'). void main() => runApp(const MyApp()); diff --git a/packages/go_router/example/lib/main.dart b/packages/go_router/example/lib/main.dart index 71633102708e..a16d72b228ef 100644 --- a/packages/go_router/example/lib/main.dart +++ b/packages/go_router/example/lib/main.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This sample app shows an app with two screens. /// diff --git a/packages/go_router/example/lib/named_routes.dart b/packages/go_router/example/lib/named_routes.dart index abfe959b3844..a4fa5a66c37c 100644 --- a/packages/go_router/example/lib/named_routes.dart +++ b/packages/go_router/example/lib/named_routes.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; // This scenario demonstrates how to navigate using named locations instead of // URLs. diff --git a/packages/go_router/example/lib/on_exit.dart b/packages/go_router/example/lib/on_exit.dart index b4b4d7b11c44..c8af72e7a7fb 100644 --- a/packages/go_router/example/lib/on_exit.dart +++ b/packages/go_router/example/lib/on_exit.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This sample app demonstrates how to use GoRoute.onExit. void main() => runApp(const MyApp()); diff --git a/packages/go_router/example/lib/others/custom_stateful_shell_route.dart b/packages/go_router/example/lib/others/custom_stateful_shell_route.dart index 3364b8cd489e..77a69127b52c 100644 --- a/packages/go_router/example/lib/others/custom_stateful_shell_route.dart +++ b/packages/go_router/example/lib/others/custom_stateful_shell_route.dart @@ -3,9 +3,9 @@ // found in the LICENSE file. import 'package:collection/collection.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _tabANavigatorKey = GlobalKey( diff --git a/packages/go_router/example/lib/others/error_screen.dart b/packages/go_router/example/lib/others/error_screen.dart index b6ee48bf4c2e..13557248cb99 100644 --- a/packages/go_router/example/lib/others/error_screen.dart +++ b/packages/go_router/example/lib/others/error_screen.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/others/extra_param.dart b/packages/go_router/example/lib/others/extra_param.dart index d190f97022d5..a4320c4600ea 100644 --- a/packages/go_router/example/lib/others/extra_param.dart +++ b/packages/go_router/example/lib/others/extra_param.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// Family data class. class Family { diff --git a/packages/go_router/example/lib/others/init_loc.dart b/packages/go_router/example/lib/others/init_loc.dart index 7c98b8ccd6e9..d606fb265f5d 100644 --- a/packages/go_router/example/lib/others/init_loc.dart +++ b/packages/go_router/example/lib/others/init_loc.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/others/nav_observer.dart b/packages/go_router/example/lib/others/nav_observer.dart index 4375fa8a620b..21a5a076bed2 100644 --- a/packages/go_router/example/lib/others/nav_observer.dart +++ b/packages/go_router/example/lib/others/nav_observer.dart @@ -2,9 +2,9 @@ // 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:go_router/go_router.dart'; import 'package:logging/logging.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/others/push.dart b/packages/go_router/example/lib/others/push.dart index 7c58c1236977..ab82273fb25d 100644 --- a/packages/go_router/example/lib/others/push.dart +++ b/packages/go_router/example/lib/others/push.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/others/router_neglect.dart b/packages/go_router/example/lib/others/router_neglect.dart index 21bb7c9563dd..cce4f7593068 100644 --- a/packages/go_router/example/lib/others/router_neglect.dart +++ b/packages/go_router/example/lib/others/router_neglect.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/others/transitions.dart b/packages/go_router/example/lib/others/transitions.dart index 55e733fe3b4e..c7187cfeb793 100644 --- a/packages/go_router/example/lib/others/transitions.dart +++ b/packages/go_router/example/lib/others/transitions.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(App()); diff --git a/packages/go_router/example/lib/path_and_query_parameters.dart b/packages/go_router/example/lib/path_and_query_parameters.dart index 5de9d4a335e9..85bc4d0495ac 100755 --- a/packages/go_router/example/lib/path_and_query_parameters.dart +++ b/packages/go_router/example/lib/path_and_query_parameters.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; // This scenario demonstrates how to use path parameters and query parameters. // diff --git a/packages/go_router/example/lib/path_parameter_regex.dart b/packages/go_router/example/lib/path_parameter_regex.dart index 72a9884b4016..a863c417d576 100644 --- a/packages/go_router/example/lib/path_parameter_regex.dart +++ b/packages/go_router/example/lib/path_parameter_regex.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// Router configuration demonstrating regex-constrained path parameters. final GoRouter router = GoRouter( diff --git a/packages/go_router/example/lib/push_with_shell_route.dart b/packages/go_router/example/lib/push_with_shell_route.dart index 1630f8b94170..0b4328e7e3d7 100644 --- a/packages/go_router/example/lib/push_with_shell_route.dart +++ b/packages/go_router/example/lib/push_with_shell_route.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; // This scenario demonstrates the behavior when pushing ShellRoute in various // scenario. diff --git a/packages/go_router/example/lib/redirection.dart b/packages/go_router/example/lib/redirection.dart index 2ce00134d186..d51206ae87af 100644 --- a/packages/go_router/example/lib/redirection.dart +++ b/packages/go_router/example/lib/redirection.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; // This scenario demonstrates how to use redirect to handle a sign-in flow. // diff --git a/packages/go_router/example/lib/route_metadata.dart b/packages/go_router/example/lib/route_metadata.dart index aaaab4d7e098..1c4e0ed36275 100644 --- a/packages/go_router/example/lib/route_metadata.dart +++ b/packages/go_router/example/lib/route_metadata.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(const RouteMetadataApp()); diff --git a/packages/go_router/example/lib/routing_config.dart b/packages/go_router/example/lib/routing_config.dart index 8626015b3654..079a249daf5b 100644 --- a/packages/go_router/example/lib/routing_config.dart +++ b/packages/go_router/example/lib/routing_config.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// This app shows how to dynamically add more route into routing config void main() => runApp(const MyApp()); diff --git a/packages/go_router/example/lib/shell_route.dart b/packages/go_router/example/lib/shell_route.dart index 69b533a1b8a7..6514efb2fe01 100644 --- a/packages/go_router/example/lib/shell_route.dart +++ b/packages/go_router/example/lib/shell_route.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _shellNavigatorKey = GlobalKey(debugLabel: 'shell'); diff --git a/packages/go_router/example/lib/shell_route_top_route.dart b/packages/go_router/example/lib/shell_route_top_route.dart index 61565172719b..b1f67a9db267 100644 --- a/packages/go_router/example/lib/shell_route_top_route.dart +++ b/packages/go_router/example/lib/shell_route_top_route.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _shellNavigatorKey = GlobalKey(debugLabel: 'shell'); diff --git a/packages/go_router/example/lib/state_restoration/go_route_state_restoration.dart b/packages/go_router/example/lib/state_restoration/go_route_state_restoration.dart index bcffd41a45cb..5e6ce797d346 100644 --- a/packages/go_router/example/lib/state_restoration/go_route_state_restoration.dart +++ b/packages/go_router/example/lib/state_restoration/go_route_state_restoration.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(const App()); diff --git a/packages/go_router/example/lib/state_restoration/shell_route_state_restoration.dart b/packages/go_router/example/lib/state_restoration/shell_route_state_restoration.dart index 72836946ef6e..0f686bdb12af 100644 --- a/packages/go_router/example/lib/state_restoration/shell_route_state_restoration.dart +++ b/packages/go_router/example/lib/state_restoration/shell_route_state_restoration.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(const App()); diff --git a/packages/go_router/example/lib/state_restoration/stateful_shell_route_state_restoration.dart b/packages/go_router/example/lib/state_restoration/stateful_shell_route_state_restoration.dart index bf79d0d6ffde..2b9ab80bf184 100644 --- a/packages/go_router/example/lib/state_restoration/stateful_shell_route_state_restoration.dart +++ b/packages/go_router/example/lib/state_restoration/stateful_shell_route_state_restoration.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() => runApp(const App()); diff --git a/packages/go_router/example/lib/stateful_shell_route.dart b/packages/go_router/example/lib/stateful_shell_route.dart index 1d485fae23f4..9b8dc3e05117 100644 --- a/packages/go_router/example/lib/stateful_shell_route.dart +++ b/packages/go_router/example/lib/stateful_shell_route.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _sectionANavigatorKey = GlobalKey( diff --git a/packages/go_router/example/lib/top_level_on_enter.dart b/packages/go_router/example/lib/top_level_on_enter.dart index c7b4f518ed0f..5bb21c325eee 100644 --- a/packages/go_router/example/lib/top_level_on_enter.dart +++ b/packages/go_router/example/lib/top_level_on_enter.dart @@ -4,8 +4,8 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// Simulated service for handling referrals and deep links class ReferralService { diff --git a/packages/go_router/example/lib/transition_animations.dart b/packages/go_router/example/lib/transition_animations.dart index 8ad9876353db..e85cbe3ea029 100644 --- a/packages/go_router/example/lib/transition_animations.dart +++ b/packages/go_router/example/lib/transition_animations.dart @@ -2,8 +2,8 @@ // 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:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; /// To use a custom transition animation, provide a `pageBuilder` with a /// CustomTransitionPage. diff --git a/packages/go_router/example/pubspec.yaml b/packages/go_router/example/pubspec.yaml index 5bf4e780dea9..55dd8b853776 100644 --- a/packages/go_router/example/pubspec.yaml +++ b/packages/go_router/example/pubspec.yaml @@ -4,18 +4,20 @@ version: 3.0.1 publish_to: none environment: - sdk: ^3.10.0 - flutter: ">=3.38.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: adaptive_navigation: ^0.0.4 collection: ^1.15.0 cupertino_icons: ^1.0.2 + cupertino_ui: ^1.0.0 flutter: sdk: flutter go_router: path: .. logging: ^1.0.0 + material_ui: ^1.0.0 shared_preferences: ^2.0.11 url_launcher: ^6.0.7 diff --git a/packages/go_router/example/test/custom_stateful_shell_route_test.dart b/packages/go_router/example/test/custom_stateful_shell_route_test.dart index b770a847f16c..ce269758ca7a 100644 --- a/packages/go_router/example/test/custom_stateful_shell_route_test.dart +++ b/packages/go_router/example/test/custom_stateful_shell_route_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/others/custom_stateful_shell_route.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('Changing active tab in TabController of TabbedRootScreen (root screen ' diff --git a/packages/go_router/example/test/on_exit_test.dart b/packages/go_router/example/test/on_exit_test.dart index c2b09982d69c..7e3422e1f53b 100644 --- a/packages/go_router/example/test/on_exit_test.dart +++ b/packages/go_router/example/test/on_exit_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/on_exit.dart' as example; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('example works', (WidgetTester tester) async { diff --git a/packages/go_router/example/test/redirection_test.dart b/packages/go_router/example/test/redirection_test.dart index 2188d7cdc02a..c736ab92e987 100644 --- a/packages/go_router/example/test/redirection_test.dart +++ b/packages/go_router/example/test/redirection_test.dart @@ -2,10 +2,10 @@ // 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:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router_examples/redirection.dart' as example; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('example works', (WidgetTester tester) async { diff --git a/packages/go_router/example/test/shell_route_test.dart b/packages/go_router/example/test/shell_route_test.dart index 406aace90df1..f4bc74994346 100644 --- a/packages/go_router/example/test/shell_route_test.dart +++ b/packages/go_router/example/test/shell_route_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/shell_route.dart' as example; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('example works', (WidgetTester tester) async { diff --git a/packages/go_router/example/test/state_restoration/go_route_state_restoration_test.dart b/packages/go_router/example/test/state_restoration/go_route_state_restoration_test.dart index bac4fe9912d8..3465c1c5a4b0 100644 --- a/packages/go_router/example/test/state_restoration/go_route_state_restoration_test.dart +++ b/packages/go_router/example/test/state_restoration/go_route_state_restoration_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/state_restoration/go_route_state_restoration.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('GoRoute navigation location and route state ' diff --git a/packages/go_router/example/test/state_restoration/shell_route_state_restoration_test.dart b/packages/go_router/example/test/state_restoration/shell_route_state_restoration_test.dart index 80977cfe8ade..4386eda0c511 100644 --- a/packages/go_router/example/test/state_restoration/shell_route_state_restoration_test.dart +++ b/packages/go_router/example/test/state_restoration/shell_route_state_restoration_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/state_restoration/shell_route_state_restoration.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('ShellRoute navigation location and route state ' diff --git a/packages/go_router/example/test/state_restoration/stateful_shell_route_state_restoration_test.dart b/packages/go_router/example/test/state_restoration/stateful_shell_route_state_restoration_test.dart index 4ad7e6c55674..02e3a1196cd1 100644 --- a/packages/go_router/example/test/state_restoration/stateful_shell_route_state_restoration_test.dart +++ b/packages/go_router/example/test/state_restoration/stateful_shell_route_state_restoration_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router_examples/state_restoration/stateful_shell_route_state_restoration.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('StatefulShellRoute navigation location and route state ' diff --git a/packages/go_router/lib/src/information_provider.dart b/packages/go_router/lib/src/information_provider.dart index 2674c9799320..6736e0ec9432 100644 --- a/packages/go_router/lib/src/information_provider.dart +++ b/packages/go_router/lib/src/information_provider.dart @@ -86,15 +86,13 @@ class GoRouteInformationProvider extends RouteInformationProvider GoRouteInformationProvider({ required String initialLocation, required Object? initialExtra, - Listenable? refreshListenable, - bool routerNeglect = false, - }) : _refreshListenable = refreshListenable, - _value = RouteInformation( + this._refreshListenable, + this._routerNeglect = false, + }) : _value = RouteInformation( uri: Uri.parse(initialLocation), state: RouteInformationState(extra: initialExtra, type: NavigatingType.go), ), - _valueInEngine = _kEmptyRouteInformation, - _routerNeglect = routerNeglect { + _valueInEngine = _kEmptyRouteInformation { _refreshListenable?.addListener(notifyListeners); } diff --git a/packages/go_router/lib/src/pages/cupertino.dart b/packages/go_router/lib/src/pages/cupertino.dart index 3061059d44b9..b31424262ab8 100644 --- a/packages/go_router/lib/src/pages/cupertino.dart +++ b/packages/go_router/lib/src/pages/cupertino.dart @@ -4,7 +4,7 @@ // ignore_for_file: diagnostic_describe_all_properties -import 'package:flutter/cupertino.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import '../misc/extensions.dart'; /// Checks for CupertinoApp in the widget tree. diff --git a/packages/go_router/lib/src/pages/material.dart b/packages/go_router/lib/src/pages/material.dart index 299bfbf42427..e5f28b667919 100644 --- a/packages/go_router/lib/src/pages/material.dart +++ b/packages/go_router/lib/src/pages/material.dart @@ -4,7 +4,7 @@ // ignore_for_file: diagnostic_describe_all_properties -import 'package:flutter/material.dart'; +import 'package:material_ui/material_ui.dart'; import '../misc/extensions.dart'; diff --git a/packages/go_router/lib/src/parser.dart b/packages/go_router/lib/src/parser.dart index 096cd2537eec..7b8adf322bf5 100644 --- a/packages/go_router/lib/src/parser.dart +++ b/packages/go_router/lib/src/parser.dart @@ -323,16 +323,14 @@ class GoRouteInformationParser extends RouteInformationParser { class _OnEnterHandler { /// Creates an [_OnEnterHandler] instance. /// - /// * [configuration] is the current route configuration containing all route definitions. - /// * [router] is the [GoRouter] instance used for navigation actions. - /// * [onParserException] is an optional exception handler invoked on route parsing errors. + /// * [_configuration] is the current route configuration containing all route definitions. + /// * [_router] is the [GoRouter] instance used for navigation actions. + /// * [_onParserException] is an optional exception handler invoked on route parsing errors. _OnEnterHandler({ - required RouteConfiguration configuration, - required GoRouter router, - required ParserExceptionHandler? onParserException, - }) : _onParserException = onParserException, - _configuration = configuration, - _router = router; + required this._configuration, + required this._router, + required this._onParserException, + }); /// The current route configuration. /// diff --git a/packages/go_router/lib/src/route.dart b/packages/go_router/lib/src/route.dart index d6cd5a5143f5..3f36a7967c6f 100644 --- a/packages/go_router/lib/src/route.dart +++ b/packages/go_router/lib/src/route.dart @@ -1216,10 +1216,9 @@ class StatefulNavigationShell extends StatefulWidget { /// Constructs an [StatefulNavigationShell]. StatefulNavigationShell({ required this.shellRouteContext, - required GoRouter router, + required this._router, required this.containerBuilder, }) : assert(shellRouteContext.route is StatefulShellRoute), - _router = router, currentIndex = _indexOfBranchNavigatorKey( shellRouteContext.route as StatefulShellRoute, shellRouteContext.navigatorKey, diff --git a/packages/go_router/lib/src/router.dart b/packages/go_router/lib/src/router.dart index 5f1ff5dbb793..cbe7ae4a91cf 100644 --- a/packages/go_router/lib/src/router.dart +++ b/packages/go_router/lib/src/router.dart @@ -222,7 +222,7 @@ class GoRouter implements RouterConfig { /// /// See [routing_config.dart](https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/routing_config.dart). GoRouter.routingConfig({ - required ValueListenable routingConfig, + required this._routingConfig, Codec? extraCodec, GoExceptionHandler? onException, GoRouterPageBuilder? errorPageBuilder, @@ -237,8 +237,7 @@ class GoRouter implements RouterConfig { GlobalKey? navigatorKey, String? restorationScopeId, bool requestFocus = true, - }) : _routingConfig = routingConfig, - backButtonDispatcher = RootBackButtonDispatcher(), + }) : backButtonDispatcher = RootBackButtonDispatcher(), assert( initialExtra == null || initialLocation != null, 'initialLocation must be set in order to use initialExtra', diff --git a/packages/go_router/pending_changelogs/material_ui_and_cupertino_ui.yaml b/packages/go_router/pending_changelogs/material_ui_and_cupertino_ui.yaml new file mode 100644 index 000000000000..37b122c67402 --- /dev/null +++ b/packages/go_router/pending_changelogs/material_ui_and_cupertino_ui.yaml @@ -0,0 +1,4 @@ +changelog: | + - Migrates to material_ui and cupertino_ui. + - Updates minimum supported SDK version to Flutter 3.44/Dart 3.12. +version: major diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index d8641367c8d9..ad07e1f95330 100644 --- a/packages/go_router/pubspec.yaml +++ b/packages/go_router/pubspec.yaml @@ -6,16 +6,18 @@ repository: https://github.com/flutter/packages/tree/main/packages/go_router issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22 environment: - sdk: ^3.10.0 - flutter: ">=3.38.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: collection: ^1.15.0 + cupertino_ui: ^1.0.0 flutter: sdk: flutter flutter_web_plugins: sdk: flutter logging: ^1.0.0 + material_ui: ^1.0.0 meta: ^1.7.0 dev_dependencies: diff --git a/packages/go_router/test/builder_test.dart b/packages/go_router/test/builder_test.dart index 859aa115d093..26dd65f52601 100644 --- a/packages/go_router/test/builder_test.dart +++ b/packages/go_router/test/builder_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/cupertino_test.dart b/packages/go_router/test/cupertino_test.dart index d6de929c75f4..37376f121f1c 100644 --- a/packages/go_router/test/cupertino_test.dart +++ b/packages/go_router/test/cupertino_test.dart @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/src/pages/cupertino.dart'; +import 'package:material_ui/material_ui.dart'; import 'helpers/error_screen_helpers.dart'; diff --git a/packages/go_router/test/custom_transition_page_test.dart b/packages/go_router/test/custom_transition_page_test.dart index 491a5eec1e1b..47f222b34094 100644 --- a/packages/go_router/test/custom_transition_page_test.dart +++ b/packages/go_router/test/custom_transition_page_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('CustomTransitionPage builds its child using transitionsBuilder', ( diff --git a/packages/go_router/test/delegate_test.dart b/packages/go_router/test/delegate_test.dart index 12d2d914ad6a..cfddc82b35d0 100644 --- a/packages/go_router/test/delegate_test.dart +++ b/packages/go_router/test/delegate_test.dart @@ -2,10 +2,10 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; import 'package:go_router/src/misc/error_screen.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/error_page_test.dart b/packages/go_router/test/error_page_test.dart index 7637d34010f0..51f449a1710b 100644 --- a/packages/go_router/test/error_page_test.dart +++ b/packages/go_router/test/error_page_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/src/misc/error_screen.dart'; +import 'package:material_ui/material_ui.dart'; import 'helpers/error_screen_helpers.dart'; diff --git a/packages/go_router/test/exception_handling_test.dart b/packages/go_router/test/exception_handling_test.dart index f1fbd8ab2518..ec133f6a4a63 100644 --- a/packages/go_router/test/exception_handling_test.dart +++ b/packages/go_router/test/exception_handling_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/extension_test.dart b/packages/go_router/test/extension_test.dart index 6a70da3a7f9c..8f098c4fa4a0 100644 --- a/packages/go_router/test/extension_test.dart +++ b/packages/go_router/test/extension_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { group('replaceNamed', () { diff --git a/packages/go_router/test/extra_codec_test.dart b/packages/go_router/test/extra_codec_test.dart index 06e6e0ffc696..d796b858b528 100644 --- a/packages/go_router/test/extra_codec_test.dart +++ b/packages/go_router/test/extra_codec_test.dart @@ -4,10 +4,10 @@ import 'dart:convert'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/go_route_test.dart b/packages/go_router/test/go_route_test.dart index c455ada89e25..7ccadba31488 100644 --- a/packages/go_router/test/go_route_test.dart +++ b/packages/go_router/test/go_route_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/go_router_state_test.dart b/packages/go_router/test/go_router_state_test.dart index 22bd03d50b9f..beb060cd4330 100644 --- a/packages/go_router/test/go_router_state_test.dart +++ b/packages/go_router/test/go_router_state_test.dart @@ -2,10 +2,10 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; import 'package:go_router/src/state.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/go_router_test.dart b/packages/go_router/test/go_router_test.dart index 2b75eea24fd8..fc38957ae039 100644 --- a/packages/go_router/test/go_router_test.dart +++ b/packages/go_router/test/go_router_test.dart @@ -8,13 +8,13 @@ import 'dart:async'; import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; import 'package:go_router/src/match.dart'; import 'package:go_router/src/pages/material.dart'; import 'package:logging/logging.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/helpers/error_screen_helpers.dart b/packages/go_router/test/helpers/error_screen_helpers.dart index cc877df38bfa..fae3aec7e1d9 100644 --- a/packages/go_router/test/helpers/error_screen_helpers.dart +++ b/packages/go_router/test/helpers/error_screen_helpers.dart @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import '../test_helpers.dart'; diff --git a/packages/go_router/test/imperative_api_test.dart b/packages/go_router/test/imperative_api_test.dart index a00b7c20bf78..4a26ee92f957 100644 --- a/packages/go_router/test/imperative_api_test.dart +++ b/packages/go_router/test/imperative_api_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/inherited_test.dart b/packages/go_router/test/inherited_test.dart index aebc538310f7..a6224d44b64b 100644 --- a/packages/go_router/test/inherited_test.dart +++ b/packages/go_router/test/inherited_test.dart @@ -3,9 +3,9 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/logging_test.dart b/packages/go_router/test/logging_test.dart index 76c4d7fb9db6..f03413353b1a 100644 --- a/packages/go_router/test/logging_test.dart +++ b/packages/go_router/test/logging_test.dart @@ -4,11 +4,11 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; import 'package:go_router/src/logging.dart'; import 'package:logging/logging.dart'; +import 'package:material_ui/material_ui.dart'; void main() { tearDown(() { diff --git a/packages/go_router/test/match_test.dart b/packages/go_router/test/match_test.dart index 7a1fcd956f62..d7c3ff16abb8 100644 --- a/packages/go_router/test/match_test.dart +++ b/packages/go_router/test/match_test.dart @@ -4,9 +4,9 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { group('RouteMatch', () { diff --git a/packages/go_router/test/material_test.dart b/packages/go_router/test/material_test.dart index c862e903b14f..131364892b98 100644 --- a/packages/go_router/test/material_test.dart +++ b/packages/go_router/test/material_test.dart @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/src/pages/material.dart'; +import 'package:material_ui/material_ui.dart'; import 'helpers/error_screen_helpers.dart'; diff --git a/packages/go_router/test/name_case_test.dart b/packages/go_router/test/name_case_test.dart index b002dba1b36c..5874b3e57333 100644 --- a/packages/go_router/test/name_case_test.dart +++ b/packages/go_router/test/name_case_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('Route names are case sensitive', (WidgetTester tester) async { diff --git a/packages/go_router/test/on_enter_test.dart b/packages/go_router/test/on_enter_test.dart index 7a9603597690..31374985ed7d 100644 --- a/packages/go_router/test/on_enter_test.dart +++ b/packages/go_router/test/on_enter_test.dart @@ -6,9 +6,9 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { group('onEnter', () { diff --git a/packages/go_router/test/on_exit_test.dart b/packages/go_router/test/on_exit_test.dart index 990ee9a9a6a3..3fabd13ecf66 100644 --- a/packages/go_router/test/on_exit_test.dart +++ b/packages/go_router/test/on_exit_test.dart @@ -4,9 +4,9 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/parser_test.dart b/packages/go_router/test/parser_test.dart index df989615eadc..fb86c2056529 100644 --- a/packages/go_router/test/parser_test.dart +++ b/packages/go_router/test/parser_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/rebuild_test.dart b/packages/go_router/test/rebuild_test.dart index b6b88522a556..29aab8f70821 100644 --- a/packages/go_router/test/rebuild_test.dart +++ b/packages/go_router/test/rebuild_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/redirect_chain_test.dart b/packages/go_router/test/redirect_chain_test.dart index 41a262b16bdd..41e77821fd10 100644 --- a/packages/go_router/test/redirect_chain_test.dart +++ b/packages/go_router/test/redirect_chain_test.dart @@ -4,9 +4,9 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/request_focus.dart b/packages/go_router/test/request_focus.dart index 14757cdc2fe8..e0c5eacfd2a6 100644 --- a/packages/go_router/test/request_focus.dart +++ b/packages/go_router/test/request_focus.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; void main() { testWidgets('GoRouter does not request focus if requestFocus is false', ( diff --git a/packages/go_router/test/route_data_test.dart b/packages/go_router/test/route_data_test.dart index cc3fd91489fb..6b525c83b756 100644 --- a/packages/go_router/test/route_data_test.dart +++ b/packages/go_router/test/route_data_test.dart @@ -5,9 +5,9 @@ import 'dart:async'; import 'dart:convert'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; class _GoRouteDataBuild extends GoRouteData { const _GoRouteDataBuild(); diff --git a/packages/go_router/test/routing_config_test.dart b/packages/go_router/test/routing_config_test.dart index 8926f3aa51fb..f51c5c0d814d 100644 --- a/packages/go_router/test/routing_config_test.dart +++ b/packages/go_router/test/routing_config_test.dart @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; +import 'package:cupertino_ui/cupertino_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/shell_route_observers_test.dart b/packages/go_router/test/shell_route_observers_test.dart index 568528a3e8a4..f9128982c46c 100644 --- a/packages/go_router/test/shell_route_observers_test.dart +++ b/packages/go_router/test/shell_route_observers_test.dart @@ -2,9 +2,9 @@ // 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:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/shell_route_system_back_test.dart b/packages/go_router/test/shell_route_system_back_test.dart index ac2fca2f6db5..cd81054dd9e8 100644 --- a/packages/go_router/test/shell_route_system_back_test.dart +++ b/packages/go_router/test/shell_route_system_back_test.dart @@ -3,9 +3,9 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/stateful_shell_route_system_back_test.dart b/packages/go_router/test/stateful_shell_route_system_back_test.dart index 7e66d58827a1..c3bfe2452908 100644 --- a/packages/go_router/test/stateful_shell_route_system_back_test.dart +++ b/packages/go_router/test/stateful_shell_route_system_back_test.dart @@ -3,9 +3,9 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; import 'test_helpers.dart'; diff --git a/packages/go_router/test/test_helpers.dart b/packages/go_router/test/test_helpers.dart index 96653c8c52bb..dfe4d1fc06fb 100644 --- a/packages/go_router/test/test_helpers.dart +++ b/packages/go_router/test/test_helpers.dart @@ -7,10 +7,10 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_ui/material_ui.dart'; Future createGoRouter(WidgetTester tester) async { final goRouter = GoRouter(