Skip to content

Commit

Permalink
Upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed Dec 23, 2022
1 parent 316147b commit 1d8ed91
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 93 deletions.
6 changes: 2 additions & 4 deletions example/lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:mono_kit/mono_kit.dart';
import 'router/router.dart';

class App extends ConsumerWidget {
const App({Key? key}) : super(key: key);
const App({super.key});
static const title = 'adaptive_dialog Demo';

@override
Expand All @@ -16,9 +16,7 @@ class App extends ConsumerWidget {
title: title,
theme: lightTheme(),
darkTheme: darkTheme(),
routeInformationParser: router.routeInformationParser,
routerDelegate: router.routerDelegate,
routeInformationProvider: router.routeInformationProvider,
routerConfig: ref.watch(routerProvider),
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:flutter/material.dart' hide Router;
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter_web_plugins/url_strategy.dart';

import 'app.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();
GoRouter.setUrlPathStrategy(UrlPathStrategy.path);
setUrlStrategy(PathUrlStrategy());
AdaptiveDialog.instance.updateConfiguration(
macOS: AdaptiveDialogMacOSConfiguration(
applicationIcon: ClipRRect(
Expand Down
8 changes: 5 additions & 3 deletions example/lib/pages/alert_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import 'package:go_router/go_router.dart';
class AlertRoute extends GoRouteData {
const AlertRoute();
@override
Widget build(BuildContext context) => const AlertPage();
Widget build(BuildContext context, GoRouterState state) => const AlertPage();
}

class AlertPage extends StatelessWidget {
const AlertPage({Key? key}) : super(key: key);
const AlertPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -99,7 +99,9 @@ class AlertPage extends StatelessWidget {
builder: (context, child) => Theme(
data: ThemeData(
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(primary: Colors.orange),
style: TextButton.styleFrom(
foregroundColor: Colors.orange,
),
),
),
child: child,
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:go_router/go_router.dart';
import 'package:url_launcher/url_launcher.dart';

class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -54,7 +54,7 @@ class HomePage extends StatelessWidget {
}

class _StyleDropdownButton extends ConsumerWidget {
const _StyleDropdownButton({Key? key}) : super(key: key);
const _StyleDropdownButton();
@override
Widget build(BuildContext context, WidgetRef ref) {
return Card(
Expand Down
7 changes: 4 additions & 3 deletions example/lib/pages/nested_navigator_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import 'package:go_router/go_router.dart';
class NestedNavigatorRoute extends GoRouteData {
const NestedNavigatorRoute();
@override
Widget build(BuildContext context) => const NestedNavigatorPage();
Widget build(BuildContext context, GoRouterState state) =>
const NestedNavigatorPage();
}

class NestedNavigatorPage extends StatelessWidget {
const NestedNavigatorPage({Key? key}) : super(key: key);
const NestedNavigatorPage({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -23,7 +24,7 @@ class NestedNavigatorPage extends StatelessWidget {
}

class _RootPage extends StatelessWidget {
const _RootPage({Key? key}) : super(key: key);
const _RootPage();
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/sheet_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import 'package:go_router/go_router.dart';
class SheetRoute extends GoRouteData {
const SheetRoute();
@override
Widget build(BuildContext context) => const SheetPage();
Widget build(BuildContext context, GoRouterState state) => const SheetPage();
}

class SheetPage extends StatelessWidget {
const SheetPage({Key? key}) : super(key: key);
const SheetPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 3 additions & 2 deletions example/lib/pages/text_input_dialog_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import 'package:go_router/go_router.dart';
class TextInputDialogRoute extends GoRouteData {
const TextInputDialogRoute();
@override
Widget build(BuildContext context) => const TextInputDialogPage();
Widget build(BuildContext context, GoRouterState state) =>
const TextInputDialogPage();
}

class TextInputDialogPage extends ConsumerWidget {
const TextInputDialogPage({Key? key}) : super(key: key);
const TextInputDialogPage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final routerProvider = Provider(
class HomeRoute extends GoRouteData {
const HomeRoute();
@override
Widget build(BuildContext context) => const HomePage();
Widget build(BuildContext context, GoRouterState state) => const HomePage();
}

String pascalCaseFromRouteName(String name) => name.pascalCase;
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
dynamic_color: 394d6a888650f8534e029b27d2f8bc5c64e44008
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
macos_ui: 125c911559d646194386d84c017ad6819122e2db
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3

Expand Down
Loading

0 comments on commit 1d8ed91

Please # to comment.