ResponseModel<T>.fromJson constructor

ResponseModel<T>.fromJson(
  1. Map<String, dynamic> json,
  2. T fromJson(
    1. Map<String, dynamic>
    )
)

Implementation

factory ResponseModel.fromJson(Map<String, dynamic> json, T Function(Map<String, dynamic>) fromJson) {
  return ResponseModel<T>(
    data: fromJson(json['data']),
    error: json['error'] ?? false,
    message: json['message'] ?? "",
  );
}