FileInfo.fromMap constructor

FileInfo.fromMap(
  1. Map map
)

Implementation

factory FileInfo.fromMap(Map<dynamic, dynamic> map) {
  return FileInfo(
    name: map['name'] as String,
    size: (map['size'] as num).toInt(),
    isDirectory: map['isDirectory'] as bool,
    lastModified: DateTime.fromMillisecondsSinceEpoch(
      (map['lastModified'] as num).toInt(),
    ),
  );
}