2024-04-29 12:22:06 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
|
|
|
|
|
|
extension SolianCommonExtensions on BuildContext {
|
|
|
|
Future<void> showErrorDialog(dynamic exception) => showDialog<void>(
|
2024-04-30 12:31:54 +00:00
|
|
|
context: this,
|
|
|
|
builder: (ctx) => AlertDialog(
|
|
|
|
title: Text(AppLocalizations.of(this)!.errorHappened),
|
|
|
|
content: Text(exception.toString()),
|
|
|
|
actions: [
|
|
|
|
TextButton(
|
|
|
|
onPressed: () => Navigator.pop(ctx),
|
|
|
|
child: Text(AppLocalizations.of(this)!.confirmOkay),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|