InstallResult.fromMap constructor

InstallResult.fromMap(
  1. Map map
)

Implementation

factory InstallResult.fromMap(Map<dynamic, dynamic> map) {
  final statusStr = map['status']?.toString();
  final status = statusStr == 'success'
      ? InstallStatus.success
      : statusStr == 'pending'
          ? InstallStatus.pending
          : InstallStatus.failed;
  return InstallResult(
    status: status,
    message: map['message']?.toString(),
    profileId: map['profileId']?.toString(),
  );
}