dashboard method

Widget dashboard({
  1. Widget? removeIcon,
  2. dynamic onPick(
    1. List<File?>
    )?,
  3. EdgeInsets? margin,
  4. Color? backgroundColor,
  5. PickedItemDecoration? pickedItemDecoration,
  6. PickedItemDecoration? singleItemDecoration,
  7. Widget? headerText,
  8. Widget? selectedFiles,
  9. Widget? addMore,
  10. Widget? showSelected,
})

Returns a widget that displays a dashboard for picking multiple files.

The removeIcon is the widget to display for removing a file from the list of selected files.

The onPick is the callback that is invoked when files are picked.

The margin is the margin to apply to the widget.

The backgroundColor is the background color to apply to the widget.

The addMore is the widget to display for adding files to the list of selected files.

The showSelected is the widget to display for cancelling file selection.

Example usage:

RhFiles.instance.dashboard(
  onPick: (list) {
    files = list;
    setState(() {});
  },
),

Implementation

Widget dashboard({
  Widget? removeIcon,
  Function(List<File?>)? onPick,
  EdgeInsets? margin,
  Color? backgroundColor,
  PickedItemDecoration? pickedItemDecoration,
  PickedItemDecoration? singleItemDecoration,
  Widget? headerText,
  Widget? selectedFiles,
  Widget? addMore,
  Widget? showSelected,
}) {
  return RhFilePicker.multiple(
    removeIcon: removeIcon,
    onPick: onPick,
    margin: margin,
    backgroundColor: backgroundColor,
    pickedItemDecoration: pickedItemDecoration,
    singleItemDecoration: singleItemDecoration,
    headerText: headerText,
    selectedFiles: selectedFiles,
    addMore: addMore,
    showSelected: showSelected,
  );
}