showAlert static method
void
showAlert({})
Implementation
static void showAlert(
{String? title,
required String message,
List<Widget>? actions,
Widget? content,
required BuildContext context}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: MirrorflyUikit.theme == "dark" ? darkPopupColor : Colors.white,
title: title != null
? Text(
title,
style: TextStyle(fontSize: 17, color: MirrorflyUikit.getTheme?.textPrimaryColor),
)
: const SizedBox.shrink(),
contentPadding: title != null
? const EdgeInsets.only(top: 15, right: 25, left: 25, bottom: 0)
: const EdgeInsets.only(top: 0, right: 25, left: 25, bottom: 5),
content: content ??
Text(
message,
style: TextStyle(
color: MirrorflyUikit.getTheme?.textSecondaryColor, fontWeight: FontWeight.normal),
),
contentTextStyle: TextStyle(
color: MirrorflyUikit.getTheme?.textSecondaryColor, fontWeight: FontWeight.w500),
actions: actions,
);
},
);
}