NativeDropView constructor

const NativeDropView({
  1. Key? key,
  2. required Widget child,
  3. int allowedTotal = 0,
  4. List<DropDataType>? allowedDropDataTypes,
  5. List<String>? allowedDropFileExtensions,
  6. bool receiveNonAllowedItems = true,
  7. required DropViewLoadingCallback loading,
  8. required DropViewDataReceivedCallback dataReceived,
  9. Color? backgroundColor,
  10. Color? borderColor,
  11. int? borderWidth,
  12. DropViewCreatedCallback? created,
})

A widget that adds drag and drop functionality

Must set allowedDropDataTypes or allowedDropFileExtensions

Implementation

const NativeDropView(
    {Key? key,
    required this.child,
    this.allowedTotal = 0,
    this.allowedDropDataTypes,
    this.allowedDropFileExtensions,
    this.receiveNonAllowedItems = true,
    required this.loading,
    required this.dataReceived,
    this.backgroundColor,
    this.borderColor,
    this.borderWidth,
    this.created})
    : assert((borderColor == null && borderWidth == null) ||
          (borderColor != null && borderWidth != null) ||
          allowedDropDataTypes != null ||
          allowedDropFileExtensions != null ||
          allowedTotal >= 0),
      super(key: key);