ShareDialog class

屏幕中间 dialog 弹窗 可指定最多五个需要展示的分享渠道图标(目前内设有:微信,朋友圈,qq,qq 空间,微博,链接,短信) 如需展示内设渠道之外的分享渠道,支持自定义展示渠道图标 可自定义分享弹框标题文案 可自定义分享弹框辅助信息 可自定义文案和分享渠道中间的分割线内文案

Inheritance

Constructors

ShareDialog({required BuildContext context, required String titleText, String? descText, String? separatorText, required List<int> shareChannels, ShareDialogItemClickCallBack? clickCallBack, ShareDialogGetCustomShareItemTitle? getCustomChannelTitle, ShareDialogGetCustomShareItemIcon? getCustomChannelWidget, Color titleColor = const Color(0xff222222), Color descColor = const Color(0xff666666), Color shareTextColor = const Color(0xff999999), Color separatorLineColor = const Color(0xfff0f0f0), DialogConfig? themeData})

Properties

clickCallBack ShareDialogItemClickCallBack?
点击事件
final
context BuildContext
final
descColor Color
分享渠道文案颜色,默认值 Color(0xff666666)
final
descText String?
弹框辅助信息文案,为空则不显示辅助信息
final
getCustomChannelTitle ShareDialogGetCustomShareItemTitle?
回调获取名称
final
getCustomChannelWidget ShareDialogGetCustomShareItemIcon?
回调获取图片(Widget)
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separatorLineColor Color
分割线颜色,默认值 Color(0xffEEEEEE)
final
separatorText String?
文案与分享渠道图标间的分割线内嵌文案
final
shareChannels List<int>
分享渠道列表
final
shareTextColor Color
分享文本颜色,Color(0xff999999)
final
themeData DialogConfig?
dialog配置
getter/setter pair
titleColor Color
标题颜色,默认值 Color(0xff222222)
final
titleText String
标题文本
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
show() → dynamic
dialog弹出
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