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 json) => _$ScoreModelFromJson(json); Map toJson() => _$ScoreModelToJson(this); } class ScoreController extends GetControllerEx { ScoreController() { attr = GetModel(ScoreModel()).obs; } }