showVVDialog function
void
showVVDialog(
- BuildContext context, {
- String? content,
- String? title,
- String? hintText,
- Widget? contentWidget,
- int? maxLength,
- double? width,
- bool? enableEmoji,
- String? confirmButtonText,
- String? cancelButtonText,
- required VVDialogType type,
- DialogTapCallBack? onConfirmTap,
- DialogTapCallBack? onCancelTap,
- InputConfirmTapCallBack? onConfirmTapWithInput,
- bool? showCancelButton,
显示对话框的方法 根据不同的类型展示相应的对话框
Implementation
void showVVDialog(BuildContext context,
{String? content,
String? title,
String? hintText,
Widget? contentWidget,
int? maxLength,
double? width,
bool? enableEmoji,
String? confirmButtonText,
String? cancelButtonText,
required VVDialogType type,
DialogTapCallBack? onConfirmTap,
DialogTapCallBack? onCancelTap,
InputConfirmTapCallBack? onConfirmTapWithInput,
bool? showCancelButton}) {
showDialog(
context: context,
builder: (context) => Scaffold(
backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: true,
body: _getDialogWidget(
type: type,
title: title ?? "",
content: content ?? "",
hintText: hintText ?? "",
maxLength: maxLength ?? 20,
confirmButtonText: confirmButtonText ?? "",
cancelButtonText: cancelButtonText ?? "",
onConfirmTap: onConfirmTap ?? () {},
onCancelTap: onCancelTap ?? () {},
onConfirmTapWithInput: onConfirmTapWithInput ?? (String data) {},
enableEmoji: enableEmoji ?? false,
showCancelButton: showCancelButton ?? true,
contentWidget: contentWidget ?? Container(),
width: width ?? dialogWidth,
)));
}