PictureSelection class

图片选择组件

Inheritance
Available Extensions

Constructors

PictureSelection({Key? key, int columnCount = 3, int maxCount = 9, double? mainAxisSpacing, double? crossAxisSpacing, EdgeInsets? padding, PictureSelectionRemoveFile? removed, PictureSelectionController? controller, ImageItemRender? itemBuilder, MenusBuilder? menusBuilder, PlaceholderBuilder? placeholderBuilder, bool multipleChoice = false, VoidCallback? addIconOnTap, List<PictureSelectionItemModel>? initUrls, bool enableImagePreview = true, CustomRenderBody? customRender, PictureSelectionI18nConfig i18nConfig = const PictureSelectionI18nConfig(), ValueChanged<List<PictureSelectionItemModel>>? onChange})
const

Properties

addIconOnTap VoidCallback?
弹出菜单回调
final
columnCount int
一行展示多少张图片
final
controller PictureSelectionController?
组件的控制器
final
crossAxisSpacing double?
每张图片之间的间距 (竖向)
final
customRender CustomRenderBody?
自定义渲染层
final
enableImagePreview bool
开启图片预览
final
hashCode int
The hash code for this object.
no setterinherited
i18nConfig PictureSelectionI18nConfig
多语言配置
final
initUrls List<PictureSelectionItemModel>?
初始化图片列表
final
itemBuilder ImageItemRender?
自定义图片布局
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisSpacing double?
每张图片之间的间距 (横向)
final
maxCount int
最多可以选择几张图片
final
自定义弹出菜单布局
final
multipleChoice bool
是否允许多选
final
onChange ValueChanged<List<PictureSelectionItemModel>>?
列表发生变化回调
final
padding EdgeInsets?
组件的边距
final
placeholderBuilder PlaceholderBuilder?
自定义占位小部件
final
removed PictureSelectionRemoveFile?
删除某个图片回调 如果添加了这个参数,组件将不会执行默认的删除函数
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<PictureSelection>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited