ABAServerResponse.fromMap constructor

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

Implementation

factory ABAServerResponse.fromMap(Map<String, dynamic> map) {
  int _statusCode = -1;
  if (map["status"] is int) {
    _statusCode = map["status"];
  }
  if (map["status"] is Map) {
    _statusCode = int.tryParse("${map["status"]["code"]}")!;
  }
  return ABAServerResponse(
    status: _statusCode,
    description: map["description"],
    qrString: map["qrString"],
    qrImage: map["qrImage"],
    abapayDeeplink: map["abapay_deeplink"],
    appStore: map["app_store"],
    playStore: map["play_store"],
    rawcontent: null,
  );
}