copyWith method

NiceFileItem copyWith({
  1. String? id,
  2. String? name,
  3. NiceFileType? type,
  4. int? size,
  5. DateTime? modifiedDate,
  6. String? extension,
  7. String? path,
  8. List<NiceFileItem>? children,
  9. bool? isExpanded,
  10. Map<String, dynamic>? metadata,
})

Implementation

NiceFileItem copyWith({
  String? id,
  String? name,
  NiceFileType? type,
  int? size,
  DateTime? modifiedDate,
  String? extension,
  String? path,
  List<NiceFileItem>? children,
  bool? isExpanded,
  Map<String, dynamic>? metadata,
}) {
  return NiceFileItem(
    id: id ?? this.id,
    name: name ?? this.name,
    type: type ?? this.type,
    size: size ?? this.size,
    modifiedDate: modifiedDate ?? this.modifiedDate,
    extension: extension ?? this.extension,
    path: path ?? this.path,
    children: children ?? this.children,
    isExpanded: isExpanded ?? this.isExpanded,
    metadata: metadata ?? this.metadata,
  );
}