21 lines
476 B
Dart
21 lines
476 B
Dart
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;
|
|
}
|
|
}
|