formatResult method

dynamic formatResult(
  1. Map result
)

Implementation

TokenResult formatResult(Map<dynamic, dynamic> result) {
  Map<String, dynamic> newResult = Map<String, dynamic>.from(result);
  TokenResult tokenResult = TokenResult();
  tokenResult.resultType = newResult['resultType'] as int?;
  tokenResult.resultCode = newResult['resultCode'] as int?;
  tokenResult.accessToken = newResult['accessToken'] as String?;
  tokenResult.mobile = newResult['mobile'] as String?;
  tokenResult.operatorType = newResult['operatorType'] as String?;
  tokenResult.gwAuth = newResult['gwAuth'] as String?;
  tokenResult.platform = newResult['platform'] as String?;
  tokenResult.originResult = newResult['originResult'] as String?;
  return tokenResult;
}