FlutterRouter constructor

FlutterRouter({
  1. required String name,
  2. required String path,
  3. Widget builder(
    1. BuildContext context,
    2. GoRouterState state
    )?,
  4. Page pageBuilder(
    1. BuildContext context,
    2. GoRouterState state
    )?,
  5. String? title,
  6. String? keywords,
  7. String? description,
  8. double width = 960,
  9. double height = 640,
  10. bool isDefault = false,
  11. bool minimize = true,
  12. bool maximize = true,
  13. bool resizable = true,
  14. bool close = true,
  15. bool center = false,
  16. bool auth = false,
  17. bool subWindow = false,
  18. bool hideTitleBar = false,
  19. bool isShell = false,
  20. PreferredSizeWidget? appBar,
  21. Widget? bottomNavigationBar,
  22. 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,
});