{"id":16347020,"url":"https://github.com/ospoon/fluro_plus","last_synced_at":"2025-08-01T17:38:02.299Z","repository":{"id":56828985,"uuid":"273740643","full_name":"OSpoon/fluro_plus","owner":"OSpoon","description":"Fluro_Plus对Fluro的传参进行来包装，通过传递和接收Bundle来方便使用，目前在初学阶段，欢迎指点","archived":false,"fork":false,"pushed_at":"2020-06-21T10:24:46.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-19T05:05:46.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSpoon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-20T16:06:55.000Z","updated_at":"2020-11-03T11:20:03.000Z","dependencies_parsed_at":"2022-08-29T00:20:27.757Z","dependency_job_id":null,"html_url":"https://github.com/OSpoon/fluro_plus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OSpoon/fluro_plus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Ffluro_plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Ffluro_plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Ffluro_plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Ffluro_plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSpoon","download_url":"https://codeload.github.com/OSpoon/fluro_plus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Ffluro_plus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268269023,"owners_count":24223175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T00:39:13.889Z","updated_at":"2025-08-01T17:38:02.275Z","avatar_url":"https://github.com/OSpoon.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Fluro_Plus项目简介\n\n\u003e Fluro_Plus主要对Fluro进行二次包装,采用Bundle来进行页面间传递的信使,还对Navigate进行了包装,提供常见的操作方式,更加方便使用和项目集成，目前只是在初学阶段，欢迎指点\n\n#### 使用说明\n\n##### 引入依赖\n```dart\nfluro_plus:\n    git: https://github.com/OSpoon/fluro_plus.git\n```\n\n##### 构建项目路由\n\n```dart\n/// 继承FluroPlusPageRouters\n/// 重写generatorRoutes方法\n/// 使用FluroPlusPageRouter对象来进行定义\n/// 使用Bundle进行页面间数据传输\n/// 解释：内部仍沿用Fluro的传参数方式，\n///      所有fluro传参的限制还是会存在，\n///      中文编码已在Bundle中的putString增加开关\nclass Routers extends FluroPlusPageRouters {\n  static String home = \"/home\";\n  static String one_page = \"/one_page\";\n  static String two_page = \"/two_page\";\n\n  @override\n  List\u003cFluroPlusPageRouter\u003e generatorRoutes() {\n    return [\n      FluroPlusPageRouter(\n          path: home,\n          widgetFunc: (Bundle bundle) {\n            return HomePage();\n          }),\n      FluroPlusPageRouter(\n          path: one_page,\n          widgetFunc: (Bundle bundle) {\n            return NewOnePage(\n              bundle: bundle,\n            );\n          })\n    ];\n  }\n}\n```\n\n##### 初始化路由\n\n```dart\nMyApp() {\n  FluroPlusApp.setupRoutes(Routers());\n}\n\nMaterialApp(\n  onGenerateRoute: FluroPlusApp.router.generator,\n);\n```\n\n##### 页面接收\n\n```dart\nclass NewOnePage extends StatefulWidget {\n\n  /// 通过Bundle传参\n  final Bundle bundle;\n\n  const NewOnePage({Key key, this.bundle}) : super(key: key);\n\n  @override\n  _NewOnePageState createState() =\u003e _NewOnePageState();\n}\n\nclass _NewOnePageState extends State\u003cNewOnePage\u003e {\n  @override\n  Widget build(BuildContext context) {\n    print('bundle  \u003e\u003e\u003e\u003e::: ${widget.bundle.runtimeType}');\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(\"演示NewOnePage页\"),\n      ),\n      body: Container(\n        child: Center(\n          child: Column(\n            children: \u003cWidget\u003e[\n              Text('name ${widget.bundle.getString('name')}'),\n              Text('yname ${widget.bundle.getString('yname')}'),\n              Text('desc ${widget.bundle.getString('desc')}'),\n              Text('age ${widget.bundle.getInt('age')}'),\n              Text('sex ${widget.bundle.getBool('sex')}'),\n              Text('language ${widget.bundle.getList('language')?.first}'),\n              Text('height ${widget.bundle.getDouble('height')}'),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n##### API使用\n\n```\n/// 简单跳转\nRaisedButton(\n  child: Text('简单跳转'),\n  onPressed: () {\n    FluroPlusNavigate.goto(context, Routers.one_page);\n  }),\n\n/// 简单跳转+转场动画\nRaisedButton(\n  child: Text('简单跳转+转场动画'),\n  onPressed: () {\n    FluroPlusNavigate.goto(context, Routers.one_page,\n        transitionType: TransitionType.inFromBottom);\n  }),\n\n/// 简单跳转+跳转后销毁当前页面\nRaisedButton(\n  child: Text('简单跳转+跳转后销毁当前页面'),\n  onPressed: () {\n    FluroPlusNavigate.goto(context, Routers.one_page,\n        replace: true);\n  }),\n\n/// 简单跳转+携带参数\nRaisedButton(\n  child: Text('简单跳转+携带参数'),\n  onPressed: () {\n    Bundle bundle = Bundle()\n      ..putString('name', name, isComponent: true)\n      ..putString('yname', yname)\n      ..putString('desc', desc, isComponent: true)\n      ..putBool('sex', sex)\n      ..putInt('age', age)\n      ..putList('language', language)\n      ..putDouble('height', height);\n    FluroPlusNavigate.goto(context, Routers.one_page,\n        bundle: bundle);\n  }),\n\n/// 简单跳转+携带参数+接收返回结果\nRaisedButton(\n  child: Text('简单跳转+携带参数+接收返回结果'),\n  onPressed: () {\n    Bundle bundle = Bundle()\n      ..putString('name', name, isComponent: true)\n      ..putString('yname', yname);\n    FluroPlusNavigate.gotoWithResult(context, Routers.one_page,\n        bundle: bundle, function: (result) {\n      print('result ::: ${result}');\n    });\n  }),\n```\n\n[Fluro_Plus源码地址](https://github.com/OSpoon/fluro_plus)，部分代码来自网络搜索来的案例，并注释了来源，如有未标明了请联系我一下。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fospoon%2Ffluro_plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fospoon%2Ffluro_plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fospoon%2Ffluro_plus/lists"}