BaseModel.fromJson constructor

BaseModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BaseModel.fromJson(Map<String, dynamic> json) {
  int? code = json['code']?.toInt();
  String? message = json['message']?.toString();
  return BaseModel(code: code, message: message);
}