Skip to content

Commit

Permalink
Feat: 支持到flutter 3.13.7
Browse files Browse the repository at this point in the history
  • Loading branch information
OHeroJ committed Nov 14, 2023
1 parent f35a316 commit e5d7f18
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 162 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# web_demo

Flutter 3.10.1 快速构建的一个站点样例,长期维护。
Flutter 3.13 快速构建的一个站点样例,长期维护。

在线预览:[https://webdemo.oldbird.run](https://webdemo.oldbird.run)

Expand Down
3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class MyApp extends StatelessWidget {
builder: (context, model, child) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerDelegate: GetX.router.routerDelegate,
routeInformationParser: GetX.router.routeInformationParser,
routerConfig: GetX.router.router,
theme: context.currentTheme,
builder: EasyLoading.init(),
);
Expand Down
7 changes: 1 addition & 6 deletions lib/router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ FutureOr<String?> _loginRedirect(BuildContext context, GoRouterState state) {
}

class Router {
RouterDelegate<Object> get routerDelegate => router.routerDelegate;

RouteInformationParser<Object> get routeInformationParser =>
router.routeInformationParser;

final GoRouter router = GoRouter(
observers: [MyNavObserver()],
routes: <GoRoute>[
Expand Down Expand Up @@ -80,7 +75,7 @@ class Router {
key: state.pageKey,
child: CategoryArticlesPage(
categoryId: state.pathParameters['id']!,
params: state.queryParameters,
params: state.uri.queryParameters,
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import window_to_front
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
Expand Down
Loading

0 comments on commit e5d7f18

Please sign in to comment.