ResponseModel.fromJson constructor
Creates a new instance of the ResponseModel class from a JSON map.
The json
argument is a Map with string keys and dynamic values.
The 'result' key corresponds to the result property,
and the 'reason' key corresponds to the reason property of the ResponseModel class.
Implementation
factory ResponseModel.fromJson(Map<String, dynamic> json) {
return ResponseModel(
result: json['result'] as bool,
reason: json['reason'] as String,
);
}