showErrorDialog static method
Implementation
static void showErrorDialog(BuildContext context, String message) {
showDialog(
context: context,
builder: (context) => AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
title: Row(
children: [
const Icon(Icons.error_outline, color: Colors.red, size: 28),
const SizedBox(width: 12),
Text(
l10n.translateText('error'),
style: const TextStyle(fontWeight: FontWeight.bold),
),
],
),
content: Text(message, style: const TextStyle(fontSize: 16)),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(
l10n.translateText('ok'),
style: TextStyle(
color: FlavorConfig.instance.themeConfig.primaryColor,
fontWeight: FontWeight.bold,
),
),
),
],
),
);
}