msg static method
dynamic
msg(
- dynamic context,
- dynamic title,
- dynamic msg
Implementation
static msg(context, title, msg) {
return showDialog(
context: context,
builder: (ctx) => Stack(
children: [
AlertDialog(
scrollable: true,
elevation: 0,
// backgroundColor: Colors.white,
contentPadding:
const EdgeInsets.symmetric(vertical: 5, horizontal: 20),
content: Container(
alignment: Alignment.center,
// constraints:BoxConstraints(
// maxHeight: 50
// ),
width: Sizes.width(context),
padding: const EdgeInsets.symmetric(vertical: 5),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontSize: 17,
fontWeight: FontWeight.w900),
),
BoxSize.height(10),
Text(
msg,
style: const TextStyle(
// color: Theme.of(context).colorScheme.secondary,
fontSize: 15,
fontWeight: FontWeight.w500),
),
],
)),
Container(
width: Sizes.width(context),
alignment: Alignment.centerRight,
child: TextButton(
onPressed: () {
Navigator.of(ctx).pop();
},
child: const Text(
"ok",
style: TextStyle(
fontWeight: FontWeight.w800, fontSize: 17),
),
),
)
],
),
),
),
],
),
);
}