added localization and permission error snackbar

This commit is contained in:
2026-01-22 16:27:41 +01:00
parent 8687b7788b
commit 56daf1b940

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../l10n/app_localizations.dart';
import 'url_launcher.dart' show UrlLaunchErrorCode;
class Notifying {
@@ -46,10 +47,18 @@ class Notifying {
if (errorCode == UrlLaunchErrorCode.none) {
return;
} else if (errorCode == UrlLaunchErrorCode.couldNotLaunch) {
errorText = 'Could not launch Url';
errorText = AppLocalizations.of(context)!.errorCouldNotLaunchUrl;
} else {
errorText = 'Invalid Url';
errorText = AppLocalizations.of(context)!.errorInvalidUrl;
}
showSnackbar(context, text: errorText, isError: true);
}
static void showStoragePermissionErrorSnackbar(BuildContext context) {
showSnackbar(
context,
text: AppLocalizations.of(context)!.errorStoragePermisson,
isError: true,
);
}
}