File tree Expand file tree Collapse file tree 12 files changed +90
-93
lines changed
lib/src/text_input_dialog Expand file tree Collapse file tree 12 files changed +90
-93
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import 'package:mono_kit/mono_kit.dart';
6
6
import 'router/router.dart' ;
7
7
8
8
class App extends ConsumerWidget {
9
- const App ({Key ? key}) : super ( key: key );
9
+ const App ({super . key} );
10
10
static const title = 'adaptive_dialog Demo' ;
11
11
12
12
@override
@@ -16,9 +16,7 @@ class App extends ConsumerWidget {
16
16
title: title,
17
17
theme: lightTheme (),
18
18
darkTheme: darkTheme (),
19
- routeInformationParser: router.routeInformationParser,
20
- routerDelegate: router.routerDelegate,
21
- routeInformationProvider: router.routeInformationProvider,
19
+ routerConfig: ref.watch (routerProvider),
22
20
localizationsDelegates: const [
23
21
GlobalMaterialLocalizations .delegate,
24
22
GlobalWidgetsLocalizations .delegate,
Original file line number Diff line number Diff line change 1
1
import 'package:adaptive_dialog/adaptive_dialog.dart' ;
2
2
import 'package:flutter/material.dart' hide Router;
3
3
import 'package:flutter_riverpod/flutter_riverpod.dart' ;
4
- import 'package:go_router/go_router .dart' ;
4
+ import 'package:flutter_web_plugins/url_strategy .dart' ;
5
5
6
6
import 'app.dart' ;
7
7
8
8
void main () {
9
9
WidgetsFlutterBinding .ensureInitialized ();
10
- GoRouter . setUrlPathStrategy ( UrlPathStrategy .path );
10
+ setUrlStrategy ( PathUrlStrategy () );
11
11
AdaptiveDialog .instance.updateConfiguration (
12
12
macOS: AdaptiveDialogMacOSConfiguration (
13
13
applicationIcon: ClipRRect (
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import 'package:go_router/go_router.dart';
7
7
class AlertRoute extends GoRouteData {
8
8
const AlertRoute ();
9
9
@override
10
- Widget build (BuildContext context) => const AlertPage ();
10
+ Widget build (BuildContext context, GoRouterState state ) => const AlertPage ();
11
11
}
12
12
13
13
class AlertPage extends StatelessWidget {
14
- const AlertPage ({Key ? key}) : super ( key: key );
14
+ const AlertPage ({super . key} );
15
15
16
16
@override
17
17
Widget build (BuildContext context) {
@@ -99,7 +99,9 @@ class AlertPage extends StatelessWidget {
99
99
builder: (context, child) => Theme (
100
100
data: ThemeData (
101
101
textButtonTheme: TextButtonThemeData (
102
- style: TextButton .styleFrom (primary: Colors .orange),
102
+ style: TextButton .styleFrom (
103
+ foregroundColor: Colors .orange,
104
+ ),
103
105
),
104
106
),
105
107
child: child,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import 'package:go_router/go_router.dart';
7
7
import 'package:url_launcher/url_launcher.dart' ;
8
8
9
9
class HomePage extends StatelessWidget {
10
- const HomePage ({Key ? key}) : super ( key: key );
10
+ const HomePage ({super . key} );
11
11
12
12
@override
13
13
Widget build (BuildContext context) {
@@ -54,7 +54,7 @@ class HomePage extends StatelessWidget {
54
54
}
55
55
56
56
class _StyleDropdownButton extends ConsumerWidget {
57
- const _StyleDropdownButton ({ Key ? key}) : super (key : key );
57
+ const _StyleDropdownButton ();
58
58
@override
59
59
Widget build (BuildContext context, WidgetRef ref) {
60
60
return Card (
Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ import 'package:go_router/go_router.dart';
6
6
class NestedNavigatorRoute extends GoRouteData {
7
7
const NestedNavigatorRoute ();
8
8
@override
9
- Widget build (BuildContext context) => const NestedNavigatorPage ();
9
+ Widget build (BuildContext context, GoRouterState state) =>
10
+ const NestedNavigatorPage ();
10
11
}
11
12
12
13
class NestedNavigatorPage extends StatelessWidget {
13
- const NestedNavigatorPage ({Key ? key}) : super ( key: key );
14
+ const NestedNavigatorPage ({super . key} );
14
15
15
16
@override
16
17
Widget build (BuildContext context) {
@@ -23,7 +24,7 @@ class NestedNavigatorPage extends StatelessWidget {
23
24
}
24
25
25
26
class _RootPage extends StatelessWidget {
26
- const _RootPage ({ Key ? key}) : super (key : key );
27
+ const _RootPage ();
27
28
@override
28
29
Widget build (BuildContext context) {
29
30
return Scaffold (
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ import 'package:go_router/go_router.dart';
8
8
class SheetRoute extends GoRouteData {
9
9
const SheetRoute ();
10
10
@override
11
- Widget build (BuildContext context) => const SheetPage ();
11
+ Widget build (BuildContext context, GoRouterState state ) => const SheetPage ();
12
12
}
13
13
14
14
class SheetPage extends StatelessWidget {
15
- const SheetPage ({Key ? key}) : super ( key: key );
15
+ const SheetPage ({super . key} );
16
16
17
17
@override
18
18
Widget build (BuildContext context) {
Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ import 'package:go_router/go_router.dart';
9
9
class TextInputDialogRoute extends GoRouteData {
10
10
const TextInputDialogRoute ();
11
11
@override
12
- Widget build (BuildContext context) => const TextInputDialogPage ();
12
+ Widget build (BuildContext context, GoRouterState state) =>
13
+ const TextInputDialogPage ();
13
14
}
14
15
15
16
class TextInputDialogPage extends ConsumerWidget {
16
- const TextInputDialogPage ({Key ? key}) : super ( key: key );
17
+ const TextInputDialogPage ({super . key} );
17
18
18
19
@override
19
20
Widget build (BuildContext context, WidgetRef ref) {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ final routerProvider = Provider(
31
31
class HomeRoute extends GoRouteData {
32
32
const HomeRoute ();
33
33
@override
34
- Widget build (BuildContext context) => const HomePage ();
34
+ Widget build (BuildContext context, GoRouterState state ) => const HomePage ();
35
35
}
36
36
37
37
String pascalCaseFromRouteName (String name) => name.pascalCase;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ EXTERNAL SOURCES:
25
25
26
26
SPEC CHECKSUMS:
27
27
dynamic_color: 394d6a888650f8534e029b27d2f8bc5c64e44008
28
- FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
28
+ FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
29
29
macos_ui: 125c911559d646194386d84c017ad6819122e2db
30
30
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
31
31
You can’t perform that action at this time.
0 commit comments