showIKnowAlert static method
我知道了 context
可空
Implementation
static Future showIKnowAlert(
BuildContext? context, {
bool barrierDismissible = false,
String? title,
String? message,
RichText? richTextWidget,
String? confirmText,
TextAlign? messageAlign,
bool showCloseButton = true,
void Function()? iKnowHandle,
bool? scrollable,
}) {
if (context == null) {
context = OverlayInit.contextGetBlock?.call();
}
if (context == null) {
debugPrint('🚗🚗🚗 alert context is null, 请插入context或者执行OverlayInit');
return Future(() => false);
}
return showAlert(
context,
barrierDismissible: barrierDismissible,
alertViewBulider: (context) {
return IKnowMessageAlertView(
title: title,
message: message,
richTextWidget: richTextWidget,
messageAlign: messageAlign,
iKnowTitle: confirmText ?? "我知道了",
barrierDismissible: barrierDismissible,
showCloseButton: showCloseButton,
iKnowHandle: () {
Navigator.pop(context);
if (iKnowHandle != null) {
iKnowHandle();
}
},
scrollable: scrollable,
);
},
);
}