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.scaffold,
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: () => Sint.pop(),
child: Text(AppTranslationConstants.goBack.tr,
style: const TextStyle(fontSize: 15),
),
),
DialogButton(
color: AppColor.bondiBlue75,
onPressed: () async {
Sint.pop();
await mateServiceImpl.block(postOwnerId);
AppUtilities.showSnackBar(message: MessageTranslationConstants.blockedProfileMsg);
if (Sint.isOverlaid) {
Sint.pop();
} else if (Sint.currentRoute.contains('/post')) {
Sint.back();
}
},
child: Text(AppTranslationConstants.toBlock.tr,
style: const TextStyle(fontSize: 15),
),
)
]
).show();
}