flutter_boost icon indicating copy to clipboard operation
flutter_boost copied to clipboard

优雅管理历史栈的姿势

Open on7line opened this issue 7 years ago • 5 comments

问题描述:

现在使用boost 0.420版本,目标是A->B->C,在C页面进行操作再回到B进行数据刷新,并且不会多余的后退.

image

目前采用的是下图方案1,在A->B->C->B内最后一个B页面返回增加判断,强行回到A页.Android还好使用flutter的Nav,iOS还得进行继承Flutter在后退时进行处理,总感觉这样是不对的.

方案2,是在A->B->C之后关闭C,回到B,进行数据刷新,那么如果传数据呢?

请教大家是如何处理的呢?请指教.

on7line avatar Oct 16 '19 04:10 on7line

您的意思是:a->b->c->b的页面栈需要从b直接返回a吗?

xujim avatar Oct 17 '19 02:10 xujim

是的,C只是个过渡页面,如果正常走返回的话,会再次经过C,会觉得很奇怪

on7line avatar Oct 17 '19 02:10 on7line

建议采用方案2,在A->B->C之后关闭C,回到B,进行数据刷新,close方法是可以回传数据的。 (之前使用的是0.0.420 版本,现使用的是0.1.54) example: BoostContainerSettings settings = BoostContainer.of(context).settings; FlutterBoost.singleton.closeCurrent(result: v.toJson());

colorface avatar Oct 24 '19 06:10 colorface

@on7line 解决了没,我先关闭,如果还没解决再reopen

noborder avatar Dec 27 '19 09:12 noborder

着急上线,使用笨办法解决了,等有时间升级新版本再试下,谢谢

on7line avatar Dec 27 '19 09:12 on7line