ApiResponse.fromMap constructor

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

Implementation

factory ApiResponse.fromMap(Map<String, dynamic> map) {
  return ApiResponse(
    status: (map['status'] != null)
        ? map['status'] as int
        : int.parse(map['status'] as String),
    expiryDate: map['expiryDate'] as String?,
    maxLaunch: (map['maxLaunch'] == null)
        ? null
        : int.tryParse(map['maxLaunch'] as String),
    message: map['message'] as String?,
    developerDetails: map['developerDetails'] as Map<String, dynamic>?,
  );
}