ImageWrap<T extends Object>.constant constructor

ImageWrap<T extends Object>.constant({
  1. List<ImageData<T>> images = const [],
  2. int columnCount = 4,
  3. Key? key,
  4. bool? hasFav,
  5. FutureOr<void> onDelete(
    1. T
    ) = _default,
  6. FutureOr<void> onStar(
    1. T
    ) = _default,
  7. FutureOr<void> onShare(
    1. T
    ) = _default,
  8. FutureOr<void> onRotate(
    1. T,
    2. int deltaQuarterTurns
    ) = _defaultRotate,
  9. bool selectionMode = false,
  10. Set<T>? selectedIds,
  11. ValueChanged<T>? onToggleSelection,
  12. void onSetSelection(
    1. T id,
    2. bool selected
    )?,
  13. ValueChanged<Set<T>>? onVisibleIdsChanged,
})

Implementation

ImageWrap.constant({
  List<ImageData<T>> images = const [],
  this.columnCount = 4,
  Key? key,
  this.hasFav,
  this.onDelete = _default,
  this.onStar = _default,
  this.onShare = _default,
  this.onRotate = _defaultRotate,
  this.selectionMode = false,
  Set<T>? selectedIds,
  this.onToggleSelection,
  this.onSetSelection,
  this.onVisibleIdsChanged,
})  : this.images = images.map((e) => Stream.value(e)).toList(),
      this.selectedIds = selectedIds ?? <T>{},
      super(key: key);