TreeDragAndDropController<T> constructor

TreeDragAndDropController<T>({
  1. List<String>? dropMimeTypes,
  2. List<String>? dragMimeTypes,
  3. FutureOr<void> handleDrag(
    1. List,
    2. DataTransfer,
    3. CancellationToken
    )?,
  4. FutureOr<void> handleDrop(
    1. DataTransfer,
    2. CancellationToken, [
    3. dynamic
    ])?,
})

Implementation

factory TreeDragAndDropController({
  _i2.List<_i2.String>? dropMimeTypes,
  _i2.List<_i2.String>? dragMimeTypes,
  _i4.FutureOr<void> Function(
    _i2.List<_i2.dynamic>,
    _i3.DataTransfer,
    _i3.CancellationToken,
  )? handleDrag,
  _i4.FutureOr<void> Function(
    _i3.DataTransfer,
    _i3.CancellationToken, [
    _i2.dynamic,
  ])? handleDrop,
}) =>
    TreeDragAndDropController._(
      dropMimeTypes: dropMimeTypes ?? _i6.undefined,
      dragMimeTypes: dragMimeTypes ?? _i6.undefined,
      handleDrag: handleDrag == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => handleDrag(
                    p0,
                    p1,
                    p2,
                  ))),
      handleDrop: handleDrop == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => handleDrop(
                    p0,
                    p1,
                    p2,
                  ))),
    );