添加 json annotation

hmxc
张萌 4 years ago
parent 4386da807b
commit b345b35abd

@ -600,7 +600,7 @@ packages:
source: hosted source: hosted
version: "0.6.3" version: "0.6.3"
json_annotation: json_annotation:
dependency: transitive dependency: "direct main"
description: description:
name: json_annotation name: json_annotation
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"

@ -70,6 +70,7 @@ dependencies:
shimmer: ^2.0.0-nullsafety.0 shimmer: ^2.0.0-nullsafety.0
badges: ^2.0.0-nullsafety.1 badges: ^2.0.0-nullsafety.1
json_annotation: ^4.0.1
equatable: ^2.0.0 equatable: ^2.0.0
#打开文件 #打开文件
open_file: ^3.2.1 open_file: ^3.2.1
@ -82,7 +83,6 @@ dev_dependencies:
#json序列化 #json序列化
json_serializable: ^4.1.1 json_serializable: ^4.1.1
build_runner: ^2.0.3 build_runner: ^2.0.3
json_model:
flutter: flutter:
uses-material-design: true uses-material-design: true

@ -51,3 +51,8 @@ void sort() {
void format() { void format() {
DartFmt.format(libDir); DartFmt.format(libDir);
} }
@Task('生成model')
void gen() async {
await Pub.run('build_runner', arguments: ['build']);
}

Loading…
Cancel
Save