File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ - (void)copyWithNode:(DNode *)node
66
66
self.pageType = node.pageType ;
67
67
self.target = node.target ;
68
68
self.params = node.params ;
69
+ self.identifier = node.identifier ;
69
70
}
70
71
71
72
+ (DNodePageType)pageTypeWithString : (NSString *)string
Original file line number Diff line number Diff line change @@ -70,4 +70,10 @@ class DChannel {
70
70
return _methodChannel.invokeMethod (
71
71
DStackConstant .sendHomePageRoute, {"homePageRoute" : route});
72
72
}
73
+
74
+ /// 发送更新临界节点的信息
75
+ Future sendUpdateBoundaryNode (Map params) {
76
+ return _methodChannel.invokeMethod (
77
+ DStackConstant .sendUpdateBoundaryNode, params);
78
+ }
73
79
}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class DStackConstant {
27
27
static const String sendFlutterRootNode = "sendFlutterRootNode" ;
28
28
static const String sendOperationNodeToFlutter = 'sendOperationNodeToFlutter' ;
29
29
static const String sendHomePageRoute = 'sendHomePageRoute' ;
30
+ static const String sendUpdateBoundaryNode = 'sendUpdateBoundaryNode' ;
30
31
31
32
/// 其他标识
32
33
static const String nativeDidPopGesture = "nativeDidPopGesture" ;
Original file line number Diff line number Diff line change @@ -322,23 +322,26 @@ class DNavigatorManager {
322
322
return replace (router, pageType,
323
323
homePage: homePage, animated: false , params: node.params);
324
324
} else {
325
+ PageRoute route;
325
326
bool boundary = node.boundary;
326
327
if (boundary != null && boundary) {
327
328
/// 临界页面不开启动画
328
- PageRoute route = DNavigatorManager .materialRoute (
329
+ route = DNavigatorManager .materialRoute (
329
330
routeName: router,
330
331
params: params,
331
332
fullscreenDialog: action == DStackConstant .present,
332
333
pushAnimated: false ,
333
334
);
334
- return _navigator.push (route);
335
335
} else {
336
- MaterialPageRoute route = DNavigatorManager .materialRoute (
336
+ route = DNavigatorManager .materialRoute (
337
337
routeName: router,
338
338
params: params,
339
339
fullscreenDialog: action == DStackConstant .present);
340
- return _navigator.push (route);
341
340
}
341
+ node.identifier = identifierWithRoute (route);
342
+ Map json = node.toJson ();
343
+ DStack .instance.channel.sendUpdateBoundaryNode (json);
344
+ return _navigator.push (route);
342
345
}
343
346
}
344
347
break ;
You can’t perform that action at this time.
0 commit comments