fromMap static method

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

Implementation

static SafNewFile fromMap(Map<String, dynamic> map) {
  final uriString = map['uri'] as String?;
  if (uriString == null) {
    throw Exception('Unexpected empty uri from `SafFileNewFile`');
  }
  final fileName = map['fileName'] as String?;
  return SafNewFile(Uri.parse(uriString), fileName);
}