showWarningDialog function
void
showWarningDialog(
- BuildContext context, {
- dynamic title,
- dynamic message,
- dynamic titlestye,
- dynamic messagestyle,
Implementation
void showWarningDialog(BuildContext context,{title,message,titlestye,messagestyle}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Icon(Icons.warning, color: Colors.red),
const SizedBox(width: 10),
Text(title??"",style: titlestye??const TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.black),)
],
),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
message??"",style:messagestyle??const TextStyle(fontSize: 12,fontWeight: FontWeight.w400,color: Colors.black),
//"Your trial version has expired. Please upgrade to the full version to continue using the app."
),
const SizedBox(height: 10),
const Text(
"Contact : +91 89789 09666",
)
],
),
actions: <Widget>[
Cflatbtn(
color: Colors.red,
title: "Ok",
onTap: () {
Navigator.of(context).pop();
})
],
);
},
barrierDismissible: false,
barrierLabel: "Warning");
}