multi_data_picker library
A Flutter plugin to pick multiple data types such as images, videos, and documents from the device gallery or take a new photo/video. run build_runner first before building dart run build_runner build -d or dart run build_runner watch -d This plugin provides a simple and easy-to-use API to handle the multi data picking process. It handles the permission request and provides a simple callback to get the selected data.
Example code:
MultiDataPicker<Map<String, dynamic>>(
initialValue: [
data[0],
data[1],
],
isEqual: (a, b) => a["id"] == b["id"],
decoration: InputDecoration(
labelText: "No Controller",
prefixIcon: Icon(Icons.location_city),
hintText: "Pick Multiple Region",
helperText: "This is BottomSheet mode with border",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
),
),
minHeight: 100,
dataDisplayBuilder: DataDisplayBuilder.string(
labelBuilder: (data) {
return data['name'] ?? "-";
},
),
popupType: DataPickerPopupType.bottom(
loadData: loadData,
listDataBuilder: ListDataBuilder.string(
labelBuilder: (data) => data['name'] ?? "-",
),
),
)
Classes
-
MultiDataPicker<
T> -
The
MultiDataPickerclass in Dart is a widget that allows users to select multiple values from a list of options with customizable display and behavior settings. -
MultiPickerController<
T> - A multi-selection controller.