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