FlutterRouter class

Annotations
  • @JsonSerializable.new(explicitToJson: true)

Constructors

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, Widget? bottomNavigationBar, 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:隐藏标题栏
FlutterRouter.fromJson(Map<String, dynamic> json)
factory

Properties

appBar PreferredSizeWidget?
appBar
final
auth bool
是否需要登录授权
final
bottomNavigationBar Widget?
底部导航栏
final
builder Widget Function(BuildContext context, GoRouterState state)?
页面
final
center bool
是否居中
final
close bool
是否允许关闭
final
description String?
页面描述
final
hashCode int
The hash code for this object.
no setterinherited
height double
窗口高度
final
hideTitleBar bool
更改本机窗口的标题栏样式
final
isDefault bool
是否默认路由
final
isShell bool
是否是Shell
final
keywords String?
页面关键字
final
maximize bool
是否允许最大化
final
minimize bool
是否允许最小化
final
name String
路由名称
final
pageBuilder Page Function(BuildContext context, GoRouterState state)?
页面pageBuilder
final
path String
路由路径
final
resizable bool
是否允许全屏
final
routes List<FlutterRouter>?
自定义路由
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subWindow bool
是否子窗口打开
final
title String?
页面标题
final
width double
窗口宽度
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited