棉花app新增页面
This commit is contained in:
20
lib/controller/mh/score_controller.dart
Normal file
20
lib/controller/mh/score_controller.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'score_controller.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ScoreModel {
|
||||
int? score = 5;
|
||||
|
||||
ScoreModel();
|
||||
static ScoreModel fromJson(Map<String, dynamic> json) =>
|
||||
_$ScoreModelFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ScoreModelToJson(this);
|
||||
}
|
||||
|
||||
class ScoreController extends GetControllerEx<ScoreModel> {
|
||||
ScoreController() {
|
||||
attr = GetModel(ScoreModel()).obs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user