diff --git a/pubspec.lock b/pubspec.lock index fe11134..0e82d13 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -600,7 +600,7 @@ packages: source: hosted version: "0.6.3" json_annotation: - dependency: transitive + dependency: "direct main" description: name: json_annotation url: "https://pub.flutter-io.cn" diff --git a/pubspec.yaml b/pubspec.yaml index dda885a..936b5c8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -70,6 +70,7 @@ dependencies: shimmer: ^2.0.0-nullsafety.0 badges: ^2.0.0-nullsafety.1 + json_annotation: ^4.0.1 equatable: ^2.0.0 #打开文件 open_file: ^3.2.1 @@ -82,7 +83,6 @@ dev_dependencies: #json序列化 json_serializable: ^4.1.1 build_runner: ^2.0.3 - json_model: flutter: uses-material-design: true diff --git a/tool/grind.dart b/tool/grind.dart index 12b24e9..2c802c1 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -51,3 +51,8 @@ void sort() { void format() { DartFmt.format(libDir); } + +@Task('生成model') +void gen() async { + await Pub.run('build_runner', arguments: ['build']); +}