You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
528 B

3 years ago
import 'package:json_annotation/json_annotation.dart';
part 'base_data.g.dart';
@JsonSerializable(genericArgumentFactories: true)
class BaseData<T> {
4 years ago
BaseData();
int code;
3 years ago
T data;
4 years ago
dynamic extra;
4 years ago
bool isError;
bool isSuccess;
String msg;
String path;
String timestamp;
3 years ago
factory BaseData.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) => _$BaseDataFromJson(json, fromJsonT);
Map<String, dynamic> toJson(Object Function(T value) toJsonT) => _$BaseDataToJson(this, toJsonT);
4 years ago
}