惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
H
Hacker News: Front Page
I
InfoQ
L
LangChain Blog
Security Latest
Security Latest
The Cloudflare Blog
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Scott Helme
Scott Helme
爱范儿
爱范儿
A
Arctic Wolf
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
Application and Cybersecurity Blog
Application and Cybersecurity Blog

Flutter

kkRepo 只用 1 天就支持了 Futter / Dart / Pub 仓库私服搭建、支持代理 pub.dev、支持聚合私服和 Proxy - V2EX flutter 开发的鸿蒙应用上架应用商店了 - V2EX flutter 现在开发最佳的库用什么?或者有什么好用的脚手架吗? - V2EX USB 摄像头求助。 - V2EX flutter 引入 aar 包,运行报错,版本 3.38.9 - V2EX 用 Flutter 做了一个 Redis Desktop Manager - V2EX flutter 生态这么差?写个 demo 两天都没调通 - V2EX 由于开发 flutter 然后测试是黑盒测试只会手点,开发了个插件 - V2EX 求助, flutter 项目混合式搭建问题 - V2EX 求助大神,为什么用 flutter 开发的安卓笔记软件卡顿、掉帧 - V2EX 写了一个 flutter 的状态管理库,大家参谋参谋。 - V2EX 开源一套 flutter UI 组件库,方便各位大佬快速进行跨平台开发,欢迎各位大佬 start - V2EX Flutter 的学习曲线高吗?对于个人开发者来说是否值得 - V2EX 闲着没事开发一款网文写作应用—— Letter Studio - V2EX 请教 flutter-windows 客户端白屏问题。 - V2EX 最简单的状态管理库 view_model - V2EX 第一次写 flutter app 有个疑问 - V2EX Flutter in_app_purchase 内购在 iOS 上的应用总结 - V2EX 另一个视角看 Flutter 的思维 - V2EX 招 flutter 工程师 兼职! - V2EX 求推荐一个基础框架 - V2EX Ubuntu 团队为什么无偿给 Flutter 写桌面多窗口功能? - V2EX 请教: flutter 或 Android 更新、热更新方案 - V2EX 求一份 iOS 或者 Flutter 兼职 - V2EX 求助贴!关于 Flutter 接入 in_app_purchase 内购服务端部分二次验证的 - V2EX flutter 是不是要升级所有的 widget 了? - V2EX 上架 Play store 的问题... - V2EX 应用未声明 QUERY_ALL_PACKAGES 权限却报错,是 firebase 导致的吗? - V2EX App 开发新手请教一个 flutter 开发中的安卓问题 - V2EX V 友们, Flutter 编译报错可能是什么原因 - V2EX 如何实现梯形 tab 切换 - V2EX 请教:大佬们 2025 年 Flutter 用哪个路由? - V2EX flutter 支持 harmony os next 吗 - V2EX flutter 项目二开, UI 修改与项目优化 - V2EX flutter 是否能 vscode remote 远程开发和调试 ? - V2EX 大家使用 flutter 开发的 app 用什么日活统计工具呢 - V2EX Flutter 已经可以开发鸿蒙了吗 - V2EX 基于 flutter 的 二步验证 TOTP 应用 - V2EX 有没有可以学习的 flutter riverpod 的实战项目,希望推荐下更好的状态管理方案 - V2EX flutter 开发桌面软件如何做出好看得布局, 比如像 vscode, reqable - V2EX MBA M3 16GB 能玩 flutter 开发吗? - V2EX 真的无力吐槽 flutter 了 - V2EX 有 flutter 大佬么?请教几个问题 - V2EX Flutter 开发桌面应用程序,如何获取鼠标的绝对坐标? - V2EX flutter 启动 ios 项目失败 n 次,求大神帮忙 - V2EX Flutter 3.27 Flex 终于支持 spacing 了 - V2EX 听说有一个 app 安装后可以查看手机上哪些 app 是 flutter 开发的? - V2EX flutter 实现这样的功能,红包感谢 - V2EX flatter.cn 是国内外包公司的网站么 - V2EX [求助]为什么 flutter 调试模式可以。发布模式打包出来的则无法运行。 - V2EX
Flutter GoRouter 如何实现 SingleTop - V2EX
murmurkerman · 2024-11-26 · via Flutter

有些页面需要保持单例,比如:历史 -> 详情 -> 历史-> 详情,在返回的时候需要多次返回历史页面和详情页面,期望的场景是历史页面和详情页面都是单例,假如一个用户的路径是:

  1. 主页 -> 历史 -> 详情 -> 历史,那么路由栈应该是 主页 -> 历史。
  2. 主页 -> 历史 -> 详情 -> 历史 -> 详情,那么路由栈应该是 主页 -> 历史 -> 详情

替换 Router 实现,比如 AutoRoute 不太现实,有太多页面了,测试工作量很大。

GoRouter 本身只支持push, pushReplacement, go, replace, pop

  RouteMatchList _updateRouteMatchList(
    RouteMatchList newMatchList, {
    required RouteMatchList? baseRouteMatchList,
    required Completer<Object?>? completer,
    required NavigatingType type,
  }) {
    switch (type) {
      case NavigatingType.push:
        return baseRouteMatchList!.push(
          ImperativeRouteMatch(
            pageKey: _getUniqueValueKey(),
            completer: completer!,
            matches: newMatchList,
          ),
        );
      case NavigatingType.pushReplacement:
        final RouteMatch routeMatch = baseRouteMatchList!.last;
        return baseRouteMatchList.remove(routeMatch).push(
              ImperativeRouteMatch(
                pageKey: _getUniqueValueKey(),
                completer: completer!,
                matches: newMatchList,
              ),
            );
      case NavigatingType.replace:
        final RouteMatch routeMatch = baseRouteMatchList!.last;
        return baseRouteMatchList.remove(routeMatch).push(
              ImperativeRouteMatch(
                pageKey: routeMatch.pageKey,
                completer: completer!,
                matches: newMatchList,
              ),
            );
      case NavigatingType.go:
        return newMatchList;
      case NavigatingType.restore:
        // Still need to consider redirection.
        return baseRouteMatchList!.uri.toString() != newMatchList.uri.toString()
            ? newMatchList
            : baseRouteMatchList;
    }
  }