ImagesPage<T extends Object>.futured constructor

ImagesPage<T extends Object>.futured({
  1. List<Future<ImageData<T>?>>? futureImages = const [],
  2. int columnCount = 4,
  3. Key? key,
  4. Future<String?> onNewImages(
    1. List<XFile>
    ) = _defaultAdd,
  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. Future<void> onDeleteMany(
    1. List<T>
    )?,
  10. Future<void> onShareMany(
    1. List<T>
    )?,
  11. bool hasMainImage = false,
  12. bool intendsToAddPicture = false,
})

Konstruktor für Future-basierte Bildlisten

Implementation

ImagesPage.futured({
  List<Future<ImageData<T>?>>? futureImages = const [],
  this.columnCount = 4,
  Key? key,
  this.onNewImages = _defaultAdd,
  this.onDelete = _default,
  this.onStar = _default,
  this.onShare = _default,
  this.onRotate = _defaultRotate,
  this.onDeleteMany,
  this.onShareMany,
  this.hasMainImage = false,
  this.intendsToAddPicture = false,
}) : super(key: key) {
  this._images =
      futureImages?.map((e) => Stream.fromFuture(e)).toList() ?? [];
}