infoDialog function
dynamic
infoDialog(
- BuildContext context,
- String title,
- String content, {
- Widget? titleIcon,
- String? positiveButtonText,
- Function? positiveButtonAction,
- String? negativeButtonText,
- Function? negativeButtonAction,
- String? neutralButtonText,
- Function? neutralButtonAction,
- bool hideNeutralButton = false,
- bool closeOnBackPress = false,
- bool confirmationDialog = false,
- String? confirmationMessage,
info dialog function with title and content string
positiveButtonText for positive button text
negativeButtonText for negative button text
neutralButtonText for negative button text
hideNeutralButton to hide the Neutral Button default is false
closeOnBackPress to close dialog on back button default is false
confirmationDialog to make the confirmation dialog default is false
confirmationMessage confirmation message default is 'Please check this box for Confirmation!'
Implementation
infoDialog(
BuildContext context,
String title,
String content, {
Widget? titleIcon,
String? positiveButtonText,
Function? positiveButtonAction,
String? negativeButtonText,
Function? negativeButtonAction,
String? neutralButtonText,
Function? neutralButtonAction,
bool hideNeutralButton = false,
bool closeOnBackPress = false,
bool confirmationDialog = false,
String? confirmationMessage,
}) {
return customAlertDialog(
context,
Text(title, style: dialogTitleStyle(context)),
Text(content,
textAlign: TextAlign.justify, style: dialogContentStyle(context)),
titleIcon: titleIcon ?? infoIcon(),
positiveButtonText: positiveButtonText,
positiveButtonAction: positiveButtonAction,
negativeButtonText: negativeButtonText,
negativeButtonAction: negativeButtonAction,
neutralButtonText: neutralButtonText,
neutralButtonAction: neutralButtonAction,
hideNeutralButton: hideNeutralButton,
closeOnBackPress: closeOnBackPress,
confirmationDialog: confirmationDialog,
confirmationMessage: confirmationMessage,
);
}