Skip to content

Commit 1d8ed91

Browse files
committed
Upgrade packages
1 parent 316147b commit 1d8ed91

File tree

12 files changed

+90
-93
lines changed

12 files changed

+90
-93
lines changed

example/lib/app.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:mono_kit/mono_kit.dart';
66
import 'router/router.dart';
77

88
class App extends ConsumerWidget {
9-
const App({Key? key}) : super(key: key);
9+
const App({super.key});
1010
static const title = 'adaptive_dialog Demo';
1111

1212
@override
@@ -16,9 +16,7 @@ class App extends ConsumerWidget {
1616
title: title,
1717
theme: lightTheme(),
1818
darkTheme: darkTheme(),
19-
routeInformationParser: router.routeInformationParser,
20-
routerDelegate: router.routerDelegate,
21-
routeInformationProvider: router.routeInformationProvider,
19+
routerConfig: ref.watch(routerProvider),
2220
localizationsDelegates: const [
2321
GlobalMaterialLocalizations.delegate,
2422
GlobalWidgetsLocalizations.delegate,

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import 'package:adaptive_dialog/adaptive_dialog.dart';
22
import 'package:flutter/material.dart' hide Router;
33
import 'package:flutter_riverpod/flutter_riverpod.dart';
4-
import 'package:go_router/go_router.dart';
4+
import 'package:flutter_web_plugins/url_strategy.dart';
55

66
import 'app.dart';
77

88
void main() {
99
WidgetsFlutterBinding.ensureInitialized();
10-
GoRouter.setUrlPathStrategy(UrlPathStrategy.path);
10+
setUrlStrategy(PathUrlStrategy());
1111
AdaptiveDialog.instance.updateConfiguration(
1212
macOS: AdaptiveDialogMacOSConfiguration(
1313
applicationIcon: ClipRRect(

example/lib/pages/alert_page.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import 'package:go_router/go_router.dart';
77
class AlertRoute extends GoRouteData {
88
const AlertRoute();
99
@override
10-
Widget build(BuildContext context) => const AlertPage();
10+
Widget build(BuildContext context, GoRouterState state) => const AlertPage();
1111
}
1212

1313
class AlertPage extends StatelessWidget {
14-
const AlertPage({Key? key}) : super(key: key);
14+
const AlertPage({super.key});
1515

1616
@override
1717
Widget build(BuildContext context) {
@@ -99,7 +99,9 @@ class AlertPage extends StatelessWidget {
9999
builder: (context, child) => Theme(
100100
data: ThemeData(
101101
textButtonTheme: TextButtonThemeData(
102-
style: TextButton.styleFrom(primary: Colors.orange),
102+
style: TextButton.styleFrom(
103+
foregroundColor: Colors.orange,
104+
),
103105
),
104106
),
105107
child: child,

example/lib/pages/home_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:go_router/go_router.dart';
77
import 'package:url_launcher/url_launcher.dart';
88

99
class HomePage extends StatelessWidget {
10-
const HomePage({Key? key}) : super(key: key);
10+
const HomePage({super.key});
1111

1212
@override
1313
Widget build(BuildContext context) {
@@ -54,7 +54,7 @@ class HomePage extends StatelessWidget {
5454
}
5555

5656
class _StyleDropdownButton extends ConsumerWidget {
57-
const _StyleDropdownButton({Key? key}) : super(key: key);
57+
const _StyleDropdownButton();
5858
@override
5959
Widget build(BuildContext context, WidgetRef ref) {
6060
return Card(

example/lib/pages/nested_navigator_page.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import 'package:go_router/go_router.dart';
66
class NestedNavigatorRoute extends GoRouteData {
77
const NestedNavigatorRoute();
88
@override
9-
Widget build(BuildContext context) => const NestedNavigatorPage();
9+
Widget build(BuildContext context, GoRouterState state) =>
10+
const NestedNavigatorPage();
1011
}
1112

1213
class NestedNavigatorPage extends StatelessWidget {
13-
const NestedNavigatorPage({Key? key}) : super(key: key);
14+
const NestedNavigatorPage({super.key});
1415

1516
@override
1617
Widget build(BuildContext context) {
@@ -23,7 +24,7 @@ class NestedNavigatorPage extends StatelessWidget {
2324
}
2425

2526
class _RootPage extends StatelessWidget {
26-
const _RootPage({Key? key}) : super(key: key);
27+
const _RootPage();
2728
@override
2829
Widget build(BuildContext context) {
2930
return Scaffold(

example/lib/pages/sheet_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import 'package:go_router/go_router.dart';
88
class SheetRoute extends GoRouteData {
99
const SheetRoute();
1010
@override
11-
Widget build(BuildContext context) => const SheetPage();
11+
Widget build(BuildContext context, GoRouterState state) => const SheetPage();
1212
}
1313

1414
class SheetPage extends StatelessWidget {
15-
const SheetPage({Key? key}) : super(key: key);
15+
const SheetPage({super.key});
1616

1717
@override
1818
Widget build(BuildContext context) {

example/lib/pages/text_input_dialog_page.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import 'package:go_router/go_router.dart';
99
class TextInputDialogRoute extends GoRouteData {
1010
const TextInputDialogRoute();
1111
@override
12-
Widget build(BuildContext context) => const TextInputDialogPage();
12+
Widget build(BuildContext context, GoRouterState state) =>
13+
const TextInputDialogPage();
1314
}
1415

1516
class TextInputDialogPage extends ConsumerWidget {
16-
const TextInputDialogPage({Key? key}) : super(key: key);
17+
const TextInputDialogPage({super.key});
1718

1819
@override
1920
Widget build(BuildContext context, WidgetRef ref) {

example/lib/router/router.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final routerProvider = Provider(
3131
class HomeRoute extends GoRouteData {
3232
const HomeRoute();
3333
@override
34-
Widget build(BuildContext context) => const HomePage();
34+
Widget build(BuildContext context, GoRouterState state) => const HomePage();
3535
}
3636

3737
String pascalCaseFromRouteName(String name) => name.pascalCase;

example/macos/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ EXTERNAL SOURCES:
2525

2626
SPEC CHECKSUMS:
2727
dynamic_color: 394d6a888650f8534e029b27d2f8bc5c64e44008
28-
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
28+
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
2929
macos_ui: 125c911559d646194386d84c017ad6819122e2db
3030
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
3131

0 commit comments

Comments
 (0)