dashboard method
Widget
dashboard({
- Widget? removeIcon,
- dynamic onPick()?,
- EdgeInsets? margin,
- Color? backgroundColor,
- PickedItemDecoration? pickedItemDecoration,
- PickedItemDecoration? singleItemDecoration,
- Widget? headerText,
- Widget? selectedFiles,
- Widget? addMore,
- 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,
);
}