showMoreButtonDialog static method
void
showMoreButtonDialog(
- BuildContext context, {
- required List<
String> actions, - bool showIcon = false,
- Image? iconWidget,
- String? title,
- Widget? titleWidget,
- String? message,
- Widget? messageWidget,
- String? warning,
- Widget? warningWidget,
- List<
Widget> ? actionsWidget, - bool barrierDismissible = true,
- int titleMaxLines = cTitleMaxLines,
- DialogConfig? themeData,
- DialogIndexedActionClickCallback? indexedActionClickCallback,
展示底部按钮为多个的dialog 如果设置的是文字按钮那么,每个按钮的点击通过indexedActionClickCallback处理 如果底部按钮的数量小于等于2 ,会以横排展示,否则会议竖排展示 如果数量超过了三个 会滑动展示
Implementation
static void showMoreButtonDialog(
BuildContext context, {
required List<String> actions,
bool showIcon = false,
Image? iconWidget,
String? title,
Widget? titleWidget,
String? message,
Widget? messageWidget,
String? warning,
Widget? warningWidget,
List<Widget>? actionsWidget,
bool barrierDismissible = true,
int titleMaxLines = cTitleMaxLines,
DialogConfig? themeData,
DialogIndexedActionClickCallback? indexedActionClickCallback,
}) {
showDialog<void>(
context: context,
barrierDismissible: barrierDismissible,
builder: (BuildContext dialogContext) {
return PhoenixDialog(
iconImage: iconWidget,
showIcon: showIcon,
titleText: title,
titleWidget: titleWidget,
messageText: message,
contentWidget: messageWidget,
warningWidget: warningWidget,
warningText: warning,
actionsText: actions,
actionsWidget: actionsWidget,
themeData: themeData,
titleMaxLines: titleMaxLines,
indexedActionCallback: indexedActionClickCallback);
},
);
}