Flutter widgets.

Base on photo_manager, wraps up some UI components to quickly display the photo_manager as a usable widget, inserting it wherever you need it.


Unlike photo, this library extracts various widget units so that any widget can be extracted and put into its own project. It can also be used to quickly create your own style of image/video picker.

Currently in the development stage, the API may change at any time.


import 'package:photo_manager/photo_manager.dart';
import 'package:photo_widget/photo_widget.dart';



Display AssetPathEntity

nametyperequieddefault valuedescription
pathAssetPathEntitytrueConcepts in photo_manager, used to describe albums
buildItemAssetWidgetBuilderfalseAssetWidget.buildWidgetBuild items in the list
rowCountintfalse4There are several items in a row, see GridView for details
thumbSizeintfalse100The size of each item thumbnail
scrollingWidgetWidgetfalseconst ScrollingPlaceholder()Since loading an image is a resource-consuming operation, you only start loading images when the scrolling stops, with a placeholder before loading the image.


Display AssetEntity

nametyperequieddefault valuedescription
assetAssetEntitytrueConcepts in photo_manager, used to describe asset
thumbSizeintfalse100The item thumb size.


A widget with a selection box for displaying assets is generally used in scenes where you need to select an image.

nametyperequieddefault valuedescription
assetAssetEntitytrueConcepts in photo_manager, used to describe asset
providerPickerDataProvidertrueThis is a provider for picker scenes, and internally maintains the data needed by picker
onTapFunctionfalseCallback when item is clicked, exception, there is a separate response in checkbox area
pickColorMaskBuildertypedef Widget PickColorMaskBuilder(BuildContext context, bool picked)falsePickColorMask.buildWidgetUsed to mask the image when selected or unselected
pickedCheckboxBuildertypedef Widget PickedCheckboxBuilder(BuildContext context, int checkIndex)falseWhether to build the checked flag, the default is a PickedCheckbox


Colored mask


A default white background, the blue selection box is selected, and the selected serial number will be selected after selection.