StatusModel.fromMap constructor

StatusModel.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory StatusModel.fromMap(Map<String, dynamic> map) {
  return StatusModel(
    ok: map['ok'] as bool,
    error: map['error'] != null ? map['error'] as int : null,
    errorMessage:
        map['errorMessage'] != null ? map['errorMessage'] as String : null,
    data: map['data'] != null ? map['data'] as String : null,
  );
}