| 123456789101112131415 |
- import 'package:json_annotation/json_annotation.dart';
- part 'Result.g.dart';
- @JsonSerializable()
- class Result {
- bool success;
- String error;
- String token;
- dynamic data; // list or map
- Result(this.success, this.error, this.data, this.token);
- Result.empty();
- factory Result.fromJson(Map<String, dynamic> json) => _$ResultFromJson(json);
- Map<String, dynamic> toJson() => _$ResultToJson(this);
- }
|