RequestModel.fromMap constructor
RequestModel.fromMap(
- Map<String, dynamic> map
)
Implementation
factory RequestModel.fromMap(Map<String, dynamic> map) {
return RequestModel(
type: RequestTypeEExt.fromMap(map['type']),
url: map['url'] as String,
headers:
Map<String, String>.from((map['headers'] as Map<String, String>)),
body: map['body'] != null
? Map<String, dynamic>.from((map['body'] as Map<String, dynamic>))
: null,
response: map['response'] != null ? map['response'] as String : null,
isError: map['isError'] as bool,
stackTrace:
map['stackTrace'] != null ? map['stackTrace'] as String : null,
);
}