{"id":13551386,"url":"https://github.com/lukepighetti/fluro","last_synced_at":"2025-05-14T07:08:16.970Z","repository":{"id":43026874,"uuid":"89330326","full_name":"lukepighetti/fluro","owner":"lukepighetti","description":"Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.","archived":false,"fork":false,"pushed_at":"2023-03-22T17:54:12.000Z","size":1130,"stargazers_count":3708,"open_issues_count":43,"forks_count":414,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-05-11T04:32:52.650Z","etag":null,"topics":["flutter","flutter-routing","parameters","router","routing"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/fluro","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/lukepighetti.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,"governance":null}},"created_at":"2017-04-25T07:23:44.000Z","updated_at":"2025-05-10T08:03:09.000Z","dependencies_parsed_at":"2023-01-22T05:03:48.157Z","dependency_job_id":"7f9082c0-2db5-4fb2-80cb-4b14bad78790","html_url":"https://github.com/lukepighetti/fluro","commit_stats":{"total_commits":160,"total_committers":28,"mean_commits":5.714285714285714,"dds":0.625,"last_synced_commit":"c2bc0592ee4a3bfe9a9875f6f1debed1a0ad63a6"},"previous_names":["goposse/fluro"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepighetti%2Ffluro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepighetti%2Ffluro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepighetti%2Ffluro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepighetti%2Ffluro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukepighetti","download_url":"https://codeload.github.com/lukepighetti/fluro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092657,"owners_count":22013290,"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","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":["flutter","flutter-routing","parameters","router","routing"],"created_at":"2024-08-01T12:01:47.073Z","updated_at":"2025-05-14T07:08:16.925Z","avatar_url":"https://github.com/lukepighetti.png","language":"Dart","funding_links":[],"categories":["Dart","路由库-纯Flutter","Open-Source Flutter Web Apps"],"sub_categories":["Libraries \u0026 Plugins"],"readme":"[English](./README.md) | [Português](./translations/pt/README.md)\n\n\u003cimg src=\"https://storage.googleapis.com/product-logos/logo_fluro.png\" width=\"220\"\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\nThe brightest, hippest, coolest router for Flutter.\n\n[![Version](https://img.shields.io/github/v/release/lukepighetti/fluro?label=version)](https://pub.dev/packages/fluro)\n[![Build Status](https://github.com/lukepighetti/fluro/workflows/build/badge.svg)](https://github.com/lukepighetti/fluro/actions)\n\n## Features\n\n- Simple route navigation\n- Function handlers (map to a function instead of a route)\n- Wildcard parameter matching\n- Querystring parameter parsing\n- Common transitions built-in\n- Simple custom transition creation\n- Follows `stable` Flutter channel\n- Null-safety\n\n## Example Project\n\nThere is a pretty sweet example project in the `example` folder. Check it out. Otherwise, keep reading to get up and running.\n\n## Getting started\n\nFirst, you should define a new `FluroRouter` object by initializing it as such:\n\n```dart\nfinal router = FluroRouter();\n```\n\nIt may be convenient for you to store the router globally/statically so that\nyou can access the router in other areas in your application.\n\nAfter instantiating the router, you will need to define your routes and your route handlers:\n\n```dart\nvar usersHandler = Handler(handlerFunc: (BuildContext context, Map\u003cString, dynamic\u003e params) {\n  return UsersScreen(params[\"id\"][0]);\n});\n\nvoid defineRoutes(FluroRouter router) {\n  router.define(\"/users/:id\", handler: usersHandler);\n\n  // it is also possible to define the route transition to use\n  // router.define(\"users/:id\", handler: usersHandler, transitionType: TransitionType.inFromLeft);\n}\n```\n\nIn the above example, the router will intercept a route such as\n`/users/1234` and route the application to the `UsersScreen` passing\nthe value `1234` as a parameter to that screen.\n\n## Navigating\n\nYou can use `FluroRouter` with the `MaterialApp.onGenerateRoute` parameter\nvia `FluroRouter.generator`. To do so, pass the function reference to\nthe `onGenerate` parameter like: `onGenerateRoute: router.generator`.\n\nYou can then use `Navigator.push` and the flutter routing mechanism will match the routes\nfor you.\n\nYou can also manually push to a route yourself. To do so:\n\n```dart\nrouter.navigateTo(context, \"/users/1234\", transition: TransitionType.fadeIn);\n```\n\n## Class arguments\n\nDon't want to use strings for params? No worries.\n\nAfter pushing a route with a custom `RouteSettings` you can use the `BuildContext.settings` extension to extract the settings. Typically this would be done in `Handler.handlerFunc` so you can pass `RouteSettings.arguments` to your screen widgets.\n\n```dart\n/// Push a route with custom RouteSettings if you don't want to use path params\nFluroRouter.appRouter.navigateTo(\n  context,\n  'home',\n  routeSettings: RouteSettings(\n    arguments: MyArgumentsDataClass('foo!'),\n  ),\n);\n\n/// Extract the arguments using [BuildContext.settings.arguments] or [BuildContext.arguments] for short\nvar homeHandler = Handler(\n  handlerFunc: (context, params) {\n    final args = context.settings.arguments as MyArgumentsDataClass;\n\n    return HomeComponent(args);\n  },\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepighetti%2Ffluro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukepighetti%2Ffluro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepighetti%2Ffluro/lists"}