Skip to content

Commit 20d63c9

Browse files
author
whqfor
committed
节点model增加identifier
1 parent 2f9c7ec commit 20d63c9

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

example/pubspec.lock

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ packages:
5757
relative: true
5858
source: path
5959
version: "1.2.8+4"
60-
d_stack_spy:
61-
dependency: "direct dev"
62-
description:
63-
path: "../../d_stack_spy"
64-
relative: true
65-
source: path
66-
version: "0.0.1"
6760
fake_async:
6861
dependency: transitive
6962
description:
@@ -165,4 +158,4 @@ packages:
165158
version: "2.1.0-nullsafety.3"
166159
sdks:
167160
dart: ">=2.10.0-110 <2.11.0"
168-
flutter: ">=1.20.0 <2.0.0"
161+
flutter: ">=1.17.0"

ios/Classes/Node/DNodeManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ - (void)operationNode:(DNode *)node {
387387
@"homePage": @(node.isFlutterHomePage),
388388
@"boundary": @(node.boundary),
389389
@"animated": @(node.animated),
390+
@"identifier": node.identifier != nil ? node.identifier : @"unknown",
390391
};
391392
} else {
392393
params = @{};

lib/navigator/node_entity.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,17 @@ class DNode {
6565
/// 是否为临界节点
6666
bool boundary;
6767

68+
/// 页面唯一id
69+
String identifier;
70+
6871
DNode.fromJson(Map json) {
6972
target = json["target"];
7073
action = json["action"];
7174
params = json["params"];
7275
homePage = json["homePage"] ?? false;
7376
animated = json["animated"] ?? true;
7477
boundary = json["boundary"] ?? false;
78+
identifier = json["identifier"];
7579
String pageString = json["pageType"];
7680
if (pageString.toLowerCase() == "flutter") {
7781
pageType = PageType.flutter;
@@ -88,6 +92,7 @@ class DNode {
8892
json["homePage"] = this.homePage;
8993
json["boundary"] = this.boundary;
9094
json["animated"] = this.animated;
95+
json["identifier"] = this.identifier;
9196
switch (this.pageType) {
9297
case PageType.flutter:
9398
{

0 commit comments

Comments
 (0)