搜索插件、代码仓与 APP 分类

go_router 封面
插件详情v18.1.2

go_router

一个基于 Navigation 2 的 Flutter 声明式路由器,支持深度链接、数据驱动路由等

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
527万
喜欢数
5800
Pub 分数
150

安装插件

flutter pub add go_router

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

go_router 是 Flutter 的声明式路由解决方案,利用 Navigation 2.0 实现深度链接、数据驱动的路由处理以及跨平台的无缝导航。由 Flutter 团队开发,它通过简洁明了的语法简化了复杂的路由逻辑。该路由器支持动态路由、路由守卫和嵌套导航,非常适合可扩展的应用程序。它与 Flutter 生态系统无缝集成,并提供了强大的工具来管理导航过渡过程中的状态。

适合场景

  • 移动和网页应用中的深度链接
  • 动态路由配置
  • 嵌套导航结构
  • 使用守卫实现安全的路由访问
  • 带有查询参数的状态导航

主要特点

  • 声明式路由定义
  • 支持深度链接
  • 数据驱动的路线匹配
  • 路由守卫和重定向
  • 嵌套路由层次结构

适合对象

  • 大规模的 Flutter 应用
  • 需要深度链接的应用
  • 寻求现代路由模式的开发者
  • 需要安全路由访问控制的项目
  • 跨平台应用程序,针对多种设备

使用建议

  • 需要了解导航 2.0
  • 可能在简单应用中引入复杂性
  • 在导航过程中需要仔细的状态管理
  • 与旧路由器相比,社区插件有限
  • 从旧版路由迁移可能需要重构

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter Packages

Release Status Flutter CI Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

Package Pub Points Usage Issues Pull requests
animations pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
camera pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cross_file pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_icons pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
espresso pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
extension_google_sign_in_as_googleapis_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
file_selector pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_lints pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_plugin_android_lifecycle pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg_test pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router_builder pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_adsense pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_fonts pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_maps_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_sign_in pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
image_picker pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
interactive_media_ads pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
in_app_purchase pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
local_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
material_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
metrics_center pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_parsing pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_provider pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pigeon pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pointer_interceptor pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
plugin_platform_interface pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
quick_actions pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_identity_services_web pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
rfw pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
shared_preferences pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
two_dimensional_scrollables pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
url_launcher pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_codec pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_compiler pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
video_player pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
web_benchmarks pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
webview_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
xdg_directories pub package pub points downloads GitHub issues by-label GitHub pull requests by-label

所属分类

依赖

依赖清单 5 项

源码仓库

使用此插件的项目

所在榜单