更新flutter unit web版本

This commit is contained in:
toly
2020-08-13 11:52:37 +08:00
parent 7da97ed98a
commit ba346cdbb9
2 changed files with 4 additions and 1 deletions

View File

@@ -9,8 +9,9 @@ class NodeModel extends Equatable {
final String name;
final String subtitle;
final String code;
final int priority;
const NodeModel({this.name, this.subtitle, this.code});
const NodeModel({this.name, this.subtitle, this.code,this.priority});
@override
List<Object> get props => [name, subtitle, code];
@@ -30,6 +31,7 @@ class NodeModel extends Equatable {
name: po.name,
subtitle: po.subtitle,
code: po.code,
priority: po.priority,
);
}
}

View File

@@ -57,6 +57,7 @@ class WidgetInnerRepository implements WidgetRepository {
var nodes = AppStorage.nodes
.where((element) => element.widgetId == widgetModel.id)
.map(NodeModel.fromPo).toList();
nodes.sort((a, b) => a.priority.compareTo(b.priority));
return nodes;
}