FlutterRouter constructor
FlutterRouter({
- required String name,
- required String path,
- Widget builder(
- BuildContext context,
- GoRouterState state
- Page pageBuilder(
- BuildContext context,
- GoRouterState state
- String? title,
- String? keywords,
- String? description,
- double width = 960,
- double height = 640,
- bool isDefault = false,
- bool minimize = true,
- bool maximize = true,
- bool resizable = true,
- bool close = true,
- bool center = false,
- bool auth = false,
- bool subWindow = false,
- bool hideTitleBar = false,
- bool isShell = false,
- PreferredSizeWidget? appBar,
- List<
FlutterRouter> ? routes,
自定义路由
name:路由名称
path:路由路径
builder:页面
title:页面标题
keywords:页面关键字
description:页面描述
width:窗口宽度 640
height:窗口高度 640
isDefault:是否默认路由 false
minimize:是否允许最小化 true
maximize:是否允许最大化 true
resizable:是否允许全屏 true
close:是否允许关闭 true
center:是否居中 false
auth:是否需要登录授权 false
subWindow:是否子窗口打开 false
hideTitleBar:隐藏标题栏
Implementation
FlutterRouter({
required this.name,
required this.path,
this.builder,
this.pageBuilder,
this.title,
this.keywords,
this.description,
this.width = 960,
this.height = 640,
this.isDefault = false,
this.minimize = true,
this.maximize = true,
this.resizable = true,
this.close = true,
this.center = false,
this.auth = false,
this.subWindow = false,
this.hideTitleBar = false,
this.isShell = false,
this.appBar,
this.bottomNavigationBar,
this.routes,
});