V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Atma
V2EX  ›  Android

flutter 拦截手势返回接收参数问题

  •  
  •   Atma · May 13, 2023 · 11977 views
    This topic created in 1089 days ago, the information mentioned may be changed or developed.

    路由目前采用 flutter_boost 管理,跳转到第二个页面手势返回的时候如果在 willpopscop 处理,第一个页面接收不到第一个页面数据,也查了官方,应该是这个 bug https://github.com/alibaba/flutter_boost/issues/1034 问下大家有遇到过类似的问题或者其他处理办法吗?

    2 replies    2023-05-15 23:23:08 +08:00
    x77
        1
    x77  
       May 15, 2023
    第一页等着第二页返回后再处理

    ```dart
    await Navigator.pushNamed(
    context,
    route,
    arguments: xxxxxx,
    );

    // 在这里处理第二页产生的数据变化
    xxxxxxx
    ````
    Atma
        2
    Atma  
    OP
       May 15, 2023 via Android
    @x77 这种我试过了,正常的 pop 这样可以,但是手势拦截这种不行的,接收的会是 null
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3417 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:25 · PVG 20:25 · LAX 05:25 · JFK 08:25
    ♥ Do have faith in what you're doing.