diff --git a/flutter_quill_extensions/lib/src/editor/image/image_menu.dart b/flutter_quill_extensions/lib/src/editor/image/image_menu.dart index 3d922d606..a5e55153a 100644 --- a/flutter_quill_extensions/lib/src/editor/image/image_menu.dart +++ b/flutter_quill_extensions/lib/src/editor/image/image_menu.dart @@ -149,11 +149,21 @@ class ImageOptionsMenu extends StatelessWidget { final localizations = context.loc; Navigator.of(context).pop(); - final result = await imageSaver.saveImage( - imageUrl: imageSource, - imageProvider: imageProvider, - prefersGallerySave: prefersGallerySave, - ); + SaveImageResult? result; + try { + result = await imageSaver.saveImage( + imageUrl: imageSource, + imageProvider: imageProvider, + prefersGallerySave: prefersGallerySave, + ); + } on GalleryImageSaveAccessDeniedException { + messenger.showSnackBar(SnackBar( + content: Text( + localizations.saveImagePermissionDenied, + ))); + return; + } + if (result == null) { messenger.showSnackBar(SnackBar( content: Text( diff --git a/flutter_quill_extensions/lib/src/editor/image/image_save_utils.dart b/flutter_quill_extensions/lib/src/editor/image/image_save_utils.dart index 9db672d49..7bf7bd5cd 100644 --- a/flutter_quill_extensions/lib/src/editor/image/image_save_utils.dart +++ b/flutter_quill_extensions/lib/src/editor/image/image_save_utils.dart @@ -107,6 +107,18 @@ Future shouldSaveToGallery({required bool prefersGallerySave}) async { return supportsGallerySave && prefersGallerySave; } +/// Thrown when the gallery image save operation is denied +/// due to insufficient or denied permissions. +class GalleryImageSaveAccessDeniedException implements Exception { + GalleryImageSaveAccessDeniedException([this.message]); + + final String? message; + + @override + String toString() => + message ?? 'Permission to save the image was denied or insufficient.'; +} + ImageSaver _imageSaver = ImageSaver(); ImageSaver get imageSaver => _imageSaver; @@ -115,7 +127,8 @@ ImageSaver get imageSaver => _imageSaver; set imageSaver(ImageSaver value) => _imageSaver = value; class ImageSaver { -// Returns `null` on failure. + // Returns `null` on failure. + // Throws [GalleryImageSaveAccessDeniedException] in case permission was denied or insuffeicnet. Future saveImage({ required String imageUrl, required ImageProvider imageProvider, @@ -192,7 +205,7 @@ class ImageSaver { rethrow; } - return null; + throw GalleryImageSaveAccessDeniedException(e.toString()); } rethrow; } diff --git a/flutter_quill_extensions/test/editor/image/image_save_utils_test.dart b/flutter_quill_extensions/test/editor/image/image_save_utils_test.dart index 26b40bd82..f32d4b736 100644 --- a/flutter_quill_extensions/test/editor/image/image_save_utils_test.dart +++ b/flutter_quill_extensions/test/editor/image/image_save_utils_test.dart @@ -529,21 +529,28 @@ void main() { }, ); - test('returns null in case permission is denied', () async { + test( + 'throws $GalleryImageSaveAccessDeniedException in case permission is denied', + () async { await mockShouldSaveToGallery(true); mockLoadImageBytesValue(Uint8List.fromList([1, 2, 2])); + final platformException = PlatformException(code: 'PERMISSION_DENIED'); when(() => mockQuillNativeBridge.saveImageToGallery(any(), - options: any(named: 'options'))) - .thenThrow(PlatformException(code: 'PERMISSION_DENIED')); + options: any(named: 'options'))).thenThrow(platformException); - final result = await imageSaver.saveImage( - imageProvider: FakeImageProvider(), - imageUrl: '/foo/bar', - prefersGallerySave: false, + await expectLater( + imageSaver.saveImage( + imageProvider: FakeImageProvider(), + imageUrl: '/foo/bar', + prefersGallerySave: false, + ), + throwsA( + isA().having( + (e) => e.message, 'message', platformException.toString()), + ), ); - expect(result, isNull); }); test( diff --git a/flutter_quill_extensions/test/editor/image/widgets/image_menu_test.dart b/flutter_quill_extensions/test/editor/image/widgets/image_menu_test.dart index 7e720a3de..168eb4ac5 100644 --- a/flutter_quill_extensions/test/editor/image/widgets/image_menu_test.dart +++ b/flutter_quill_extensions/test/editor/image/widgets/image_menu_test.dart @@ -58,6 +58,14 @@ void main() { ), ).thenAnswer((_) async => result); + void mockSaveImageThrows(Exception exception) => when( + () => mockImageSaver.saveImage( + imageUrl: any(named: 'imageUrl'), + imageProvider: any(named: 'imageProvider'), + prefersGallerySave: any(named: 'prefersGallerySave'), + ), + ).thenThrow(exception); + Future tapTargetWidget(WidgetTester tester) async { await tester.tap(findTargetWidget()); await tester.pump(); @@ -100,6 +108,46 @@ void main() { ); } + testWidgets( + 'shows permission denied message only when permission is denied', + (tester) async { + mockSaveImageThrows(GalleryImageSaveAccessDeniedException()); + + await pumpTargetWidget(tester); + await tapTargetWidget(tester); + + final localizations = tester.localizationsFromElement(ImageOptionsMenu); + + expect( + find.text(localizations.saveImagePermissionDenied), + findsOneWidget, + ); + expect( + find.text(localizations.errorUnexpectedSavingImage), + findsNothing, + ); + expect( + find.text(localizations.successImageDownloaded), + findsNothing, + ); + expect( + find.text(localizations.successImageSavedGallery), + findsNothing, + ); + expect( + find.text(localizations.successImageSaved), + findsNothing, + ); + expect( + find.text(localizations.openFileLocation), + findsNothing, + ); + expect( + find.text(localizations.openGallery), + findsNothing, + ); + }); + testWidgets('shows error message when saving fails', (tester) async { mockSaveImageResult(null); diff --git a/lib/src/l10n/generated/quill_localizations.dart b/lib/src/l10n/generated/quill_localizations.dart index 957f643f6..292b2222c 100644 --- a/lib/src/l10n/generated/quill_localizations.dart +++ b/lib/src/l10n/generated/quill_localizations.dart @@ -804,6 +804,12 @@ abstract class FlutterQuillLocalizations { /// In en, this message translates to: /// **'Open File Location'** String get openFileLocation; + + /// Message shown when the app is unable to save an image because a required permission was denied or skipped. + /// + /// In en, this message translates to: + /// **'Couldn’t save the image due to missing permission.'** + String get saveImagePermissionDenied; } class _FlutterQuillLocalizationsDelegate diff --git a/lib/src/l10n/generated/quill_localizations_ar.dart b/lib/src/l10n/generated/quill_localizations_ar.dart index d7fd41bc5..e4d99852b 100644 --- a/lib/src/l10n/generated/quill_localizations_ar.dart +++ b/lib/src/l10n/generated/quill_localizations_ar.dart @@ -323,4 +323,8 @@ class FlutterQuillLocalizationsAr extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_bg.dart b/lib/src/l10n/generated/quill_localizations_bg.dart index 48a36655c..419b18afe 100644 --- a/lib/src/l10n/generated/quill_localizations_bg.dart +++ b/lib/src/l10n/generated/quill_localizations_bg.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsBg extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_bn.dart b/lib/src/l10n/generated/quill_localizations_bn.dart index fb20e16ea..6b85be9e2 100644 --- a/lib/src/l10n/generated/quill_localizations_bn.dart +++ b/lib/src/l10n/generated/quill_localizations_bn.dart @@ -331,4 +331,8 @@ class FlutterQuillLocalizationsBn extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ca.dart b/lib/src/l10n/generated/quill_localizations_ca.dart index e75569ce7..27940c77d 100644 --- a/lib/src/l10n/generated/quill_localizations_ca.dart +++ b/lib/src/l10n/generated/quill_localizations_ca.dart @@ -327,4 +327,8 @@ class FlutterQuillLocalizationsCa extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_cs.dart b/lib/src/l10n/generated/quill_localizations_cs.dart index ceb9d42b0..5312f3aae 100644 --- a/lib/src/l10n/generated/quill_localizations_cs.dart +++ b/lib/src/l10n/generated/quill_localizations_cs.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsCs extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_da.dart b/lib/src/l10n/generated/quill_localizations_da.dart index 37908de75..ccd7b71c1 100644 --- a/lib/src/l10n/generated/quill_localizations_da.dart +++ b/lib/src/l10n/generated/quill_localizations_da.dart @@ -323,4 +323,8 @@ class FlutterQuillLocalizationsDa extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_de.dart b/lib/src/l10n/generated/quill_localizations_de.dart index bed99e3b3..805353dce 100644 --- a/lib/src/l10n/generated/quill_localizations_de.dart +++ b/lib/src/l10n/generated/quill_localizations_de.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsDe extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_el.dart b/lib/src/l10n/generated/quill_localizations_el.dart index e7560e3d4..a9a578a5a 100644 --- a/lib/src/l10n/generated/quill_localizations_el.dart +++ b/lib/src/l10n/generated/quill_localizations_el.dart @@ -330,4 +330,8 @@ class FlutterQuillLocalizationsEl extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_en.dart b/lib/src/l10n/generated/quill_localizations_en.dart index 2c215f49f..643ba7ed5 100644 --- a/lib/src/l10n/generated/quill_localizations_en.dart +++ b/lib/src/l10n/generated/quill_localizations_en.dart @@ -325,6 +325,10 @@ class FlutterQuillLocalizationsEn extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } /// The translations for English, as used in the United States (`en_US`). diff --git a/lib/src/l10n/generated/quill_localizations_es.dart b/lib/src/l10n/generated/quill_localizations_es.dart index 4cf59d7ee..045b78bbb 100644 --- a/lib/src/l10n/generated/quill_localizations_es.dart +++ b/lib/src/l10n/generated/quill_localizations_es.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsEs extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_fa.dart b/lib/src/l10n/generated/quill_localizations_fa.dart index 59d088826..8dcc8fbbb 100644 --- a/lib/src/l10n/generated/quill_localizations_fa.dart +++ b/lib/src/l10n/generated/quill_localizations_fa.dart @@ -326,4 +326,8 @@ class FlutterQuillLocalizationsFa extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_fr.dart b/lib/src/l10n/generated/quill_localizations_fr.dart index 258d43107..f923909dc 100644 --- a/lib/src/l10n/generated/quill_localizations_fr.dart +++ b/lib/src/l10n/generated/quill_localizations_fr.dart @@ -331,4 +331,8 @@ class FlutterQuillLocalizationsFr extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_he.dart b/lib/src/l10n/generated/quill_localizations_he.dart index 9b6b65411..c8be2fb18 100644 --- a/lib/src/l10n/generated/quill_localizations_he.dart +++ b/lib/src/l10n/generated/quill_localizations_he.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsHe extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_hi.dart b/lib/src/l10n/generated/quill_localizations_hi.dart index 6709f71c7..e8fc266bc 100644 --- a/lib/src/l10n/generated/quill_localizations_hi.dart +++ b/lib/src/l10n/generated/quill_localizations_hi.dart @@ -328,4 +328,8 @@ class FlutterQuillLocalizationsHi extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_hu.dart b/lib/src/l10n/generated/quill_localizations_hu.dart index 551481100..5fc142a38 100644 --- a/lib/src/l10n/generated/quill_localizations_hu.dart +++ b/lib/src/l10n/generated/quill_localizations_hu.dart @@ -330,4 +330,8 @@ class FlutterQuillLocalizationsHu extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_id.dart b/lib/src/l10n/generated/quill_localizations_id.dart index 0b6f24dcc..88bf761d2 100644 --- a/lib/src/l10n/generated/quill_localizations_id.dart +++ b/lib/src/l10n/generated/quill_localizations_id.dart @@ -328,4 +328,8 @@ class FlutterQuillLocalizationsId extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_it.dart b/lib/src/l10n/generated/quill_localizations_it.dart index 91e065d47..8feddf2ee 100644 --- a/lib/src/l10n/generated/quill_localizations_it.dart +++ b/lib/src/l10n/generated/quill_localizations_it.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsIt extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ja.dart b/lib/src/l10n/generated/quill_localizations_ja.dart index 0c232e276..973bd4aba 100644 --- a/lib/src/l10n/generated/quill_localizations_ja.dart +++ b/lib/src/l10n/generated/quill_localizations_ja.dart @@ -322,4 +322,8 @@ class FlutterQuillLocalizationsJa extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_km.dart b/lib/src/l10n/generated/quill_localizations_km.dart index d5eeaabce..d9c388e44 100644 --- a/lib/src/l10n/generated/quill_localizations_km.dart +++ b/lib/src/l10n/generated/quill_localizations_km.dart @@ -326,4 +326,8 @@ class FlutterQuillLocalizationsKm extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ko.dart b/lib/src/l10n/generated/quill_localizations_ko.dart index da4681ad4..70998894d 100644 --- a/lib/src/l10n/generated/quill_localizations_ko.dart +++ b/lib/src/l10n/generated/quill_localizations_ko.dart @@ -322,4 +322,8 @@ class FlutterQuillLocalizationsKo extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ku.dart b/lib/src/l10n/generated/quill_localizations_ku.dart index 1462df560..14c86a4fd 100644 --- a/lib/src/l10n/generated/quill_localizations_ku.dart +++ b/lib/src/l10n/generated/quill_localizations_ku.dart @@ -326,6 +326,10 @@ class FlutterQuillLocalizationsKu extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } /// The translations for Kurdish (`ku_CKB`). diff --git a/lib/src/l10n/generated/quill_localizations_ms.dart b/lib/src/l10n/generated/quill_localizations_ms.dart index 449e74959..660189e09 100644 --- a/lib/src/l10n/generated/quill_localizations_ms.dart +++ b/lib/src/l10n/generated/quill_localizations_ms.dart @@ -326,4 +326,8 @@ class FlutterQuillLocalizationsMs extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ne.dart b/lib/src/l10n/generated/quill_localizations_ne.dart index e98f64379..6098db119 100644 --- a/lib/src/l10n/generated/quill_localizations_ne.dart +++ b/lib/src/l10n/generated/quill_localizations_ne.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsNe extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_nl.dart b/lib/src/l10n/generated/quill_localizations_nl.dart index 67113a605..2ba1c0297 100644 --- a/lib/src/l10n/generated/quill_localizations_nl.dart +++ b/lib/src/l10n/generated/quill_localizations_nl.dart @@ -327,4 +327,8 @@ class FlutterQuillLocalizationsNl extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_no.dart b/lib/src/l10n/generated/quill_localizations_no.dart index 36fa2a6ef..fa589e792 100644 --- a/lib/src/l10n/generated/quill_localizations_no.dart +++ b/lib/src/l10n/generated/quill_localizations_no.dart @@ -327,4 +327,8 @@ class FlutterQuillLocalizationsNo extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_pl.dart b/lib/src/l10n/generated/quill_localizations_pl.dart index 991b31a7a..10f68198a 100644 --- a/lib/src/l10n/generated/quill_localizations_pl.dart +++ b/lib/src/l10n/generated/quill_localizations_pl.dart @@ -324,4 +324,8 @@ class FlutterQuillLocalizationsPl extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_pt.dart b/lib/src/l10n/generated/quill_localizations_pt.dart index 0224d4a60..838f1b963 100644 --- a/lib/src/l10n/generated/quill_localizations_pt.dart +++ b/lib/src/l10n/generated/quill_localizations_pt.dart @@ -325,6 +325,10 @@ class FlutterQuillLocalizationsPt extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } /// The translations for Portuguese, as used in Brazil (`pt_BR`). diff --git a/lib/src/l10n/generated/quill_localizations_ro.dart b/lib/src/l10n/generated/quill_localizations_ro.dart index ec788888a..b92ad59e7 100644 --- a/lib/src/l10n/generated/quill_localizations_ro.dart +++ b/lib/src/l10n/generated/quill_localizations_ro.dart @@ -328,6 +328,10 @@ class FlutterQuillLocalizationsRo extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } /// The translations for Romanian Moldavian Moldovan, as used in Romania (`ro_RO`). diff --git a/lib/src/l10n/generated/quill_localizations_ru.dart b/lib/src/l10n/generated/quill_localizations_ru.dart index cb4f37c85..9897a62fe 100644 --- a/lib/src/l10n/generated/quill_localizations_ru.dart +++ b/lib/src/l10n/generated/quill_localizations_ru.dart @@ -328,4 +328,8 @@ class FlutterQuillLocalizationsRu extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_sk.dart b/lib/src/l10n/generated/quill_localizations_sk.dart index e375234af..760bd73f7 100644 --- a/lib/src/l10n/generated/quill_localizations_sk.dart +++ b/lib/src/l10n/generated/quill_localizations_sk.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsSk extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_sr.dart b/lib/src/l10n/generated/quill_localizations_sr.dart index 072ce0422..8fec9b0f7 100644 --- a/lib/src/l10n/generated/quill_localizations_sr.dart +++ b/lib/src/l10n/generated/quill_localizations_sr.dart @@ -327,4 +327,8 @@ class FlutterQuillLocalizationsSr extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_sv.dart b/lib/src/l10n/generated/quill_localizations_sv.dart index 307dd4047..6108bc2f3 100644 --- a/lib/src/l10n/generated/quill_localizations_sv.dart +++ b/lib/src/l10n/generated/quill_localizations_sv.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsSv extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_sw.dart b/lib/src/l10n/generated/quill_localizations_sw.dart index 562093f0e..c91220a12 100644 --- a/lib/src/l10n/generated/quill_localizations_sw.dart +++ b/lib/src/l10n/generated/quill_localizations_sw.dart @@ -327,4 +327,8 @@ class FlutterQuillLocalizationsSw extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_th.dart b/lib/src/l10n/generated/quill_localizations_th.dart index beb6b0cd0..d73f51a50 100644 --- a/lib/src/l10n/generated/quill_localizations_th.dart +++ b/lib/src/l10n/generated/quill_localizations_th.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsTh extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_tk.dart b/lib/src/l10n/generated/quill_localizations_tk.dart index b5665713f..c6f47f685 100644 --- a/lib/src/l10n/generated/quill_localizations_tk.dart +++ b/lib/src/l10n/generated/quill_localizations_tk.dart @@ -323,4 +323,8 @@ class FlutterQuillLocalizationsTk extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_tr.dart b/lib/src/l10n/generated/quill_localizations_tr.dart index 84ef2632c..4cb00ed48 100644 --- a/lib/src/l10n/generated/quill_localizations_tr.dart +++ b/lib/src/l10n/generated/quill_localizations_tr.dart @@ -326,4 +326,8 @@ class FlutterQuillLocalizationsTr extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_uk.dart b/lib/src/l10n/generated/quill_localizations_uk.dart index 7c923a7b2..27334161c 100644 --- a/lib/src/l10n/generated/quill_localizations_uk.dart +++ b/lib/src/l10n/generated/quill_localizations_uk.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsUk extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_ur.dart b/lib/src/l10n/generated/quill_localizations_ur.dart index 267e9b542..5bf48480e 100644 --- a/lib/src/l10n/generated/quill_localizations_ur.dart +++ b/lib/src/l10n/generated/quill_localizations_ur.dart @@ -329,4 +329,8 @@ class FlutterQuillLocalizationsUr extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_vi.dart b/lib/src/l10n/generated/quill_localizations_vi.dart index fd05fe02e..c55e07ff6 100644 --- a/lib/src/l10n/generated/quill_localizations_vi.dart +++ b/lib/src/l10n/generated/quill_localizations_vi.dart @@ -325,4 +325,8 @@ class FlutterQuillLocalizationsVi extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } diff --git a/lib/src/l10n/generated/quill_localizations_zh.dart b/lib/src/l10n/generated/quill_localizations_zh.dart index 9453473f8..09a92b008 100644 --- a/lib/src/l10n/generated/quill_localizations_zh.dart +++ b/lib/src/l10n/generated/quill_localizations_zh.dart @@ -322,6 +322,10 @@ class FlutterQuillLocalizationsZh extends FlutterQuillLocalizations { @override String get openFileLocation => 'Open File Location'; + + @override + String get saveImagePermissionDenied => + 'Couldn’t save the image due to missing permission.'; } /// The translations for Chinese, as used in China (`zh_CN`). diff --git a/lib/src/l10n/quill_en.arb b/lib/src/l10n/quill_en.arb index 316d873aa..ac3c0c998 100644 --- a/lib/src/l10n/quill_en.arb +++ b/lib/src/l10n/quill_en.arb @@ -133,5 +133,9 @@ "openFileLocation": "Open File Location", "@openFileLocation": { "description": "Label for the button that opens the file explorer to the file's location." + }, + "saveImagePermissionDenied": "Couldn’t save the image due to missing permission.", + "@saveImagePermissionDenied": { + "description": "Message shown when the app is unable to save an image because a required permission was denied or skipped." } } diff --git a/lib/src/l10n/untranslated.json b/lib/src/l10n/untranslated.json index 24ad7bbc2..62f5cdedb 100644 --- a/lib/src/l10n/untranslated.json +++ b/lib/src/l10n/untranslated.json @@ -6,7 +6,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "bg": [ @@ -16,7 +17,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "bn": [ @@ -26,7 +28,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ca": [ @@ -36,7 +39,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "cs": [ @@ -46,7 +50,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "da": [ @@ -56,7 +61,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "de": [ @@ -66,7 +72,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "el": [ @@ -76,7 +83,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "en_US": [ @@ -86,7 +94,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "es": [ @@ -96,7 +105,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "fa": [ @@ -106,7 +116,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "fr": [ @@ -116,7 +127,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "he": [ @@ -126,7 +138,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "hi": [ @@ -136,7 +149,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "hu": [ @@ -146,7 +160,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "id": [ @@ -156,7 +171,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "it": [ @@ -166,7 +182,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ja": [ @@ -176,7 +193,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "km": [ @@ -185,7 +203,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ko": [ @@ -195,7 +214,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ku": [ @@ -205,7 +225,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ku_CKB": [ @@ -215,7 +236,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ms": [ @@ -225,7 +247,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ne": [ @@ -235,7 +258,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "nl": [ @@ -245,7 +269,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "no": [ @@ -255,7 +280,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "pl": [ @@ -265,7 +291,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "pt": [ @@ -275,7 +302,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "pt_BR": [ @@ -285,7 +313,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ro": [ @@ -295,7 +324,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ro_RO": [ @@ -305,7 +335,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ru": [ @@ -315,7 +346,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "sk": [ @@ -325,7 +357,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "sr": [ @@ -335,7 +368,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "sv": [ @@ -345,7 +379,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "sw": [ @@ -355,7 +390,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "th": [ @@ -365,7 +401,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "tk": [ @@ -375,7 +412,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "tr": [ @@ -385,7 +423,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "uk": [ @@ -395,7 +434,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "ur": [ @@ -405,7 +445,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "vi": [ @@ -415,7 +456,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "zh": [ @@ -425,7 +467,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "zh_CN": [ @@ -435,7 +478,8 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ], "zh_HK": [ @@ -445,6 +489,7 @@ "successImageSaved", "successImageDownloaded", "openGallery", - "openFileLocation" + "openFileLocation", + "saveImagePermissionDenied" ] }