showBlockProfileAlert static method
Future<void>
showBlockProfileAlert(
- MateService mateServiceImpl,
- BuildContext context,
- String postOwnerId
Implementation
static Future<void> showBlockProfileAlert(MateService mateServiceImpl, BuildContext context, String postOwnerId) async {
Alert(
context: context,
style: AlertStyle(
backgroundColor: AppColor.main50,
titleStyle: const TextStyle(fontWeight: FontWeight.bold),
),
title: CommonTranslationConstants.blockProfile.tr,
content: Column(
children: [
Text(MessageTranslationConstants.blockProfileMsg.tr,
style: const TextStyle(fontSize: 15),
),
AppTheme.heightSpace10,
Text(MessageTranslationConstants.blockProfileMsg2.tr,
style: const TextStyle(fontSize: 15),
),
],),
buttons: [
DialogButton(
color: AppColor.bondiBlue75,
onPressed: () => Navigator.pop(context),
child: Text(AppTranslationConstants.goBack.tr,
style: const TextStyle(fontSize: 15),
),
),
DialogButton(
color: AppColor.bondiBlue75,
onPressed: () async {
await mateServiceImpl.block(postOwnerId);
Navigator.pop(context);
Navigator.pop(context);
AppUtilities.showSnackBar(message: MessageTranslationConstants.blockedProfileMsg);
},
child: Text(AppTranslationConstants.toBlock.tr,
style: const TextStyle(fontSize: 15),
),
)
]
).show();
}