From a68cc4450c763685a29c61c4a83e18c9dbd11dd2 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Wed, 31 Jul 2024 23:41:25 +0100 Subject: [PATCH] chore: upgrade dependencies --- lib/components/canvas/inner_canvas.dart | 88 ++++++++++++++++----- lib/components/toolbar/toolbar.dart | 2 +- pubspec.lock | 100 ++++++++++++------------ pubspec.yaml | 2 +- 4 files changed, 119 insertions(+), 73 deletions(-) diff --git a/lib/components/canvas/inner_canvas.dart b/lib/components/canvas/inner_canvas.dart index 7771c3543..5cad6357f 100644 --- a/lib/components/canvas/inner_canvas.dart +++ b/lib/components/canvas/inner_canvas.dart @@ -85,9 +85,9 @@ class _InnerCanvasState extends State { Widget? quillEditor = widget.coreInfo.pages.isNotEmpty ? QuillEditor( + controller: + widget.coreInfo.pages[widget.pageIndex].quill.controller, configurations: QuillEditorConfigurations( - controller: - widget.coreInfo.pages[widget.pageIndex].quill.controller, sharedConfigurations: QuillSharedConfigurations( locale: locale, ), @@ -198,7 +198,7 @@ class _InnerCanvasState extends State { ); } - /// Adapted from "packages://flutter_quill/lib/src/widgets/default_styles.dart" + /// Adapted from https://github.com/singerdmx/flutter-quill/blob/master/lib/src/editor/widgets/default_styles.dart DefaultStyles _getQuillStyles({required bool invert}) { final colorScheme = Theme.of(context).colorScheme; final backgroundColor = invert ? Colors.black : Colors.white; @@ -260,17 +260,38 @@ class _InnerCanvasState extends State { ), ); - const zeroSpacing = VerticalSpacing(0, 0); + const zeroVerticalSpacing = VerticalSpacing(0, 0); + const zeroHorizontalSpacing = HorizontalSpacing(0, 0); return DefaultStyles( h1: DefaultTextBlockStyle( - textTheme.displayLarge!, zeroSpacing, zeroSpacing, null), + textTheme.displayLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), h2: DefaultTextBlockStyle( - textTheme.displayMedium!, zeroSpacing, zeroSpacing, null), + textTheme.displayMedium!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), h3: DefaultTextBlockStyle( - textTheme.displaySmall!, zeroSpacing, zeroSpacing, null), + textTheme.displaySmall!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), paragraph: DefaultTextBlockStyle( - textTheme.bodyLarge!, zeroSpacing, zeroSpacing, null), + textTheme.bodyLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), small: TextStyle( fontSize: lineHeight * 0.4, height: 1 / 0.4, @@ -298,18 +319,27 @@ class _InnerCanvasState extends State { decoration: TextDecoration.underline, ), placeHolder: DefaultTextBlockStyle( - textTheme.bodyLarge!.copyWith( - color: Colors.grey.withOpacity(0.6), - ), - zeroSpacing, - zeroSpacing, - null), + textTheme.bodyLarge!.copyWith( + color: Colors.grey.withOpacity(0.6), + ), + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), lists: DefaultListBlockStyle( - textTheme.bodyLarge!, zeroSpacing, zeroSpacing, null, null), + textTheme.bodyLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + null, + ), quote: DefaultTextBlockStyle( TextStyle(color: textTheme.bodyLarge!.color!.withOpacity(0.6)), - zeroSpacing, - zeroSpacing, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, BoxDecoration( border: Border( left: BorderSide( @@ -321,19 +351,35 @@ class _InnerCanvasState extends State { ), code: DefaultTextBlockStyle( GoogleFonts.firaMono(textStyle: textTheme.bodyLarge!), + zeroHorizontalSpacing, VerticalSpacing(-lineHeight * 0.16, lineHeight * 0.8), - zeroSpacing, + zeroVerticalSpacing, BoxDecoration( color: Colors.grey.withOpacity(0.2), borderRadius: BorderRadius.circular(3), ), ), indent: DefaultTextBlockStyle( - textTheme.bodyLarge!, zeroSpacing, zeroSpacing, null), + textTheme.bodyLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), align: DefaultTextBlockStyle( - textTheme.bodyLarge!, zeroSpacing, zeroSpacing, null), + textTheme.bodyLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), leading: DefaultTextBlockStyle( - textTheme.bodyLarge!, zeroSpacing, zeroSpacing, null), + textTheme.bodyLarge!, + zeroHorizontalSpacing, + zeroVerticalSpacing, + zeroVerticalSpacing, + null, + ), sizeSmall: TextStyle( fontSize: textTheme.bodyLarge!.fontSize!, ), diff --git a/lib/components/toolbar/toolbar.dart b/lib/components/toolbar/toolbar.dart index 2b92398f6..702341804 100644 --- a/lib/components/toolbar/toolbar.dart +++ b/lib/components/toolbar/toolbar.dart @@ -289,8 +289,8 @@ class _ToolbarState extends State { collapsed: !widget.textEditing || quill == null, child: quill != null ? QuillToolbar.simple( + controller: quill.controller, configurations: QuillSimpleToolbarConfigurations( - controller: quill.controller, sharedConfigurations: QuillSharedConfigurations( locale: TranslationProvider.of(context).flutterLocale, ), diff --git a/pubspec.lock b/pubspec.lock index 2892ffb5f..19dd8dbf2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: "direct main" description: name: app_tracking_transparency - sha256: "7b011da3165ebb5a2f93d19da22e43a94b45bb6471c825b7d163b30eff937d30" + sha256: "64d9745931e565790abdea91b518ac8dc3cebe6d0d0aaf7119343271b983259a" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.6" archive: dependency: "direct main" description: @@ -301,10 +301,10 @@ packages: dependency: transitive description: name: dart_quill_delta - sha256: "00826f118d2ac2a0e085bf358642b4ac67adfb249bb03f97e1bdd07432f53eb9" + sha256: "1797abec952dcc3004e007d7f5e547a4f23a53ed15912e52787a089da8e776de" url: "https://pub.dev" source: hosted - version: "10.0.2" + version: "10.1.4" decimal: dependency: transitive description: @@ -325,18 +325,18 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: eead12d1a1ed83d8283ab4c2f3fca23ac4082f29f25f29dff0f758f57d06ec91 + sha256: "93429694c9253d2871b3af80cf11b3cbb5c65660d402ed7bf69854ce4a089f82" url: "https://pub.dev" source: hosted - version: "10.1.0" + version: "10.1.1" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + sha256: "282d3cf731045a2feb66abfe61bbc40870ae50a3ed10a4d3d217556c35c8c2ba" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" diff_match_patch: dependency: transitive description: @@ -437,10 +437,10 @@ packages: dependency: "direct main" description: name: flex_seed_scheme - sha256: cb5b7ec4ba525d9846d8992858a1c6cfc88f9466d96b8850e2a061aa5f682539 + sha256: cc08c81879ecfd2ab840664ce4770980da0b8a319e35f51bcf763849b7f7596b url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" flutter: dependency: "direct main" description: flutter @@ -524,18 +524,18 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e + sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.0.21" flutter_quill: dependency: "direct main" description: name: flutter_quill - sha256: "3e7a8c12eff223c143ffa7b097ea4660916787aedc864aa5cd25ee7b5bc2de03" + sha256: "72d0f909826e672b9859a7abf34f154ed444f0faf2f90405901860c5482c4ada" url: "https://pub.dev" source: hosted - version: "10.0.2" + version: "10.1.4" flutter_quill_delta_from_html: dependency: transitive description: @@ -968,18 +968,18 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "30c5aa827a6ae95ce2853cdc5fe3971daaac00f6f081c419c013f7f57bff2f5e" + sha256: "490539678396d4c3c0b06efdaab75ae60675c3e0c66f72bc04c2e2c1e0e2abeb" url: "https://pub.dev" source: hosted - version: "2.2.7" + version: "2.2.9" path_provider_foundation: dependency: transitive description: @@ -1176,74 +1176,74 @@ packages: dependency: "direct main" description: name: share_plus - sha256: ef3489a969683c4f3d0239010cc8b7a2a46543a8d139e111c06c558875083544 + sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0" url: "https://pub.dev" source: hosted - version: "9.0.0" + version: "10.0.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: "0f9e4418835d1b2c3ae78fdb918251959106cefdbc4dd43526e182f80e82f6d4" + sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + sha256: c3f888ba2d659f3e75f4686112cc1e71f46177f74452d40d8307edc332296ead url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.0" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" + sha256: "041be4d9d2dc6079cf342bc8b761b03787e3b71192d658220a56cac9c04a0294" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.0" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" + sha256: "671e7a931f55a08aa45be2a13fe7247f2a41237897df434b30d2012388191833" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.5.0" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + sha256: "2ba0510d3017f91655b7543e9ee46d48619de2a2af38e5c790423f7007c7ccc1" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "034650b71e73629ca08a0bd789fd1d83cc63c2d1e405946f7cef7bc37432f93a" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + sha256: "3a293170d4d9403c3254ee05b84e62e8a9b3c5808ebd17de6a33fe9ea6457936" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + sha256: "398084b47b7f92110683cac45c6dc4aae853db47e470e5ddcd52cab7f7196ab2" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" simplytranslate: dependency: "direct dev" description: @@ -1325,18 +1325,18 @@ packages: dependency: "direct main" description: name: super_clipboard - sha256: cdab725bac26655ebd189f4d202d694a8cbc1c21e0f0478ccd7829c71716f09b + sha256: c72d2ae8c3a66b20a104523add86b7c2813b1d4cced893a9764b84fb97ac8e2a url: "https://pub.dev" source: hosted - version: "0.8.17" + version: "0.8.18" super_native_extensions: dependency: transitive description: name: super_native_extensions - sha256: fa55d452d34b7112453afbb9fa4d13c0527ff201630d10d86546497179030544 + sha256: b03f19e54744b65940a7c2cb4f93abd4819b5355aa3464d7b3c9a013b6b76db1 url: "https://pub.dev" source: hosted - version: "0.8.17" + version: "0.8.18" sync_http: dependency: transitive description: @@ -1413,10 +1413,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "95d8027db36a0e52caf55680f91e33ea6aa12a3ce608c90b06f4e429a21067ac" + sha256: "94d8ad05f44c6d4e2ffe5567ab4d741b82d62e3c8e288cc1fcea45965edf47c9" url: "https://pub.dev" source: hosted - version: "6.3.5" + version: "6.3.8" url_launcher_ios: dependency: transitive description: @@ -1461,10 +1461,10 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" uuid: dependency: transitive description: @@ -1557,10 +1557,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: f42447ca49523f11d8f70abea55ea211b3cafe172dd7a0e7ac007bb35dd356dc + sha256: c66651fba15f9d7ddd31daec42da8d6bce46c85610a7127e3ebcb39a4395c3c9 url: "https://pub.dev" source: hosted - version: "3.16.4" + version: "3.16.6" webview_flutter_platform_interface: dependency: transitive description: @@ -1581,18 +1581,18 @@ packages: dependency: transitive description: name: win32 - sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 + sha256: "015002c060f1ae9f41a818f2d5640389cc05283e368be19dc8d77cecb43c40c9" url: "https://pub.dev" source: hosted - version: "5.5.1" + version: "5.5.3" win32_registry: dependency: transitive description: name: win32_registry - sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb" + sha256: "723b7f851e5724c55409bb3d5a32b203b3afe8587eaf5dafb93a5fed8ecda0d6" url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.1.4" window_manager: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 3002acc3e..317f75af0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,7 +68,7 @@ dependencies: keybinder: ^1.0.1 pdf: ^3.8.4 - share_plus: ^9.0.0 + share_plus: ^10.0.0 file_picker: ^8.0.0+1 regexed_validator: ^2.0.0+1