FileChooserParams.fromMap constructor
FileChooserParams.fromMap(
- Map map
Implementation
factory FileChooserParams.fromMap(Map<dynamic, dynamic> map) {
final mode = map['mode'] as int?;
FileChooserMode? fileChooserMode;
if (mode != null && mode < 4) {
fileChooserMode = FileChooserMode.values[mode];
}
return FileChooserParams(
title: map['title'] as String?,
mode: fileChooserMode,
acceptTypes: (map['acceptTypes'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
filenameHint: map['filenameHint'] as String?,
isCaptureEnabled: map['isCaptureEnabled'] as bool?);
}