Json export and import feature #5
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user