This commit is contained in:
toly
2020-08-12 07:32:19 +08:00
parent e5251a694c
commit e7fd8a3801
31 changed files with 3095 additions and 100 deletions

View File

@@ -1,10 +1,10 @@
import 'package:equatable/equatable.dart';
import 'package:flutter_unit_mac/storage/po/node_po.dart';
/// create by 张风捷特烈 on 2020-03-04
/// contact me by email 1981462002@qq.com
/// 说明: 详情页节点-展示-数据模型
class NodeModel extends Equatable {
final String name;
final String subtitle;
@@ -17,13 +17,19 @@ class NodeModel extends Equatable {
factory NodeModel.fromJson(Map<String, dynamic> map) {
return NodeModel(
name: map['name'],
subtitle: map["subtitle"],
code: map["code"]);
name: map['name'], subtitle: map["subtitle"], code: map["code"]);
}
@override
String toString() {
return 'Node{name: $name, subtitle: $subtitle, code: $code}';
}
}
static NodeModel fromPo(NodePo po) {
return NodeModel(
name: po.name,
subtitle: po.subtitle,
code: po.code,
);
}
}