show method
Implementation
void show(
{required String message, Function? onPressedOk, String? buttonTitle}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: Colors.transparent,
contentPadding: EdgeInsets.zero,
content: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ConectarDesignSystem.settings.cardRadius),
color: Colors.white,
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
padding: const EdgeInsets.all(36),
child: MyText(
message,
fontSize: 18,
textAlign: TextAlign.center,
textColor: Colors.black,
),
),
Container(
height: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
ConectarDesignSystem.settings.cardRadius),
bottomRight: Radius.circular(
ConectarDesignSystem.settings.cardRadius),
),
color: ConectarDesignSystem.settings.primaryColor,
),
child: TextButton(
onPressed: () {
Navigator.pop(context);
if (onPressedOk != null) onPressedOk();
},
child: MyText(
buttonTitle ?? ConectarDesignSystem.labels.ok,
textColor: Colors.white,
),
),
)
],
),
),
);
},
);
}