diff --git a/lib/src/editor_toolbar_controller_shared/clipboard/default_clipboard_service.dart b/lib/src/editor_toolbar_controller_shared/clipboard/default_clipboard_service.dart index 00875a1f9..fe2873371 100644 --- a/lib/src/editor_toolbar_controller_shared/clipboard/default_clipboard_service.dart +++ b/lib/src/editor_toolbar_controller_shared/clipboard/default_clipboard_service.dart @@ -1,7 +1,7 @@ import 'package:flutter/services.dart' show Uint8List; import 'package:meta/meta.dart' show experimental; import 'package:quill_native_bridge/quill_native_bridge.dart' - show QuillNativeBridge, QuillNativeBridgePlatformFeature; + show QuillNativeBridge, QuillNativeBridgeFeature; import 'clipboard_service.dart'; @@ -11,7 +11,8 @@ import 'clipboard_service.dart'; class DefaultClipboardService extends ClipboardService { @override Future getHtmlText() async { - if (QuillNativeBridgePlatformFeature.getClipboardHtml.isUnsupported) { + if (!(await QuillNativeBridge.isSupported( + QuillNativeBridgeFeature.getClipboardHtml))) { return null; } return await QuillNativeBridge.getClipboardHtml(); @@ -19,7 +20,8 @@ class DefaultClipboardService extends ClipboardService { @override Future getImageFile() async { - if (QuillNativeBridgePlatformFeature.getClipboardImage.isUnsupported) { + if (!(await QuillNativeBridge.isSupported( + QuillNativeBridgeFeature.getClipboardImage))) { return null; } return await QuillNativeBridge.getClipboardImage(); @@ -27,7 +29,8 @@ class DefaultClipboardService extends ClipboardService { @override Future copyImageToClipboard(Uint8List imageBytes) async { - if (QuillNativeBridgePlatformFeature.copyImageToClipboard.isUnsupported) { + if (!(await QuillNativeBridge.isSupported( + QuillNativeBridgeFeature.copyImageToClipboard))) { return; } await QuillNativeBridge.copyImageToClipboard(imageBytes); @@ -35,7 +38,8 @@ class DefaultClipboardService extends ClipboardService { @override Future getGifFile() async { - if (QuillNativeBridgePlatformFeature.getClipboardGif.isUnsupported) { + if (!(await QuillNativeBridge.isSupported( + QuillNativeBridgeFeature.getClipboardGif))) { return null; } return QuillNativeBridge.getClipboardGif(); diff --git a/pubspec.yaml b/pubspec.yaml index 909d48120..76beb79ae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,7 +62,7 @@ dependencies: # Plugins url_launcher: ^6.2.4 flutter_keyboard_visibility: ^6.0.0 - quill_native_bridge: ^10.7.6 + quill_native_bridge: ^10.7.7 dev_dependencies: flutter_lints: ^4.0.0 diff --git a/quill_native_bridge/quill_native_bridge/CHANGELOG.md b/quill_native_bridge/quill_native_bridge/CHANGELOG.md index 28c1456de..448e71846 100644 --- a/quill_native_bridge/quill_native_bridge/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 10.7.7 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 10.7.6 - Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. diff --git a/quill_native_bridge/quill_native_bridge/README.md b/quill_native_bridge/quill_native_bridge/README.md index 216dfc41e..3886cb94b 100644 --- a/quill_native_bridge/quill_native_bridge/README.md +++ b/quill_native_bridge/quill_native_bridge/README.md @@ -3,4 +3,13 @@ An internal plugin for [`flutter_quill`](https://pub.dev/packages/flutter_quill) package to access platform-specific APIs. > [!NOTE] -> **Internal Use Only**: Exclusively for `flutter_quill`. Breaking changes may occur. \ No newline at end of file +> **Internal Use Only**: Exclusively for `flutter_quill`. Breaking changes may occur. + +| Feature | iOS | Android | macOS | Windows | Linux | Web | Description | +|------------------------------|------|---------|-------|---------|-------|--------|---------------------------------------------------------------------------------------------------------| +| **isIOSSimulator** | Yes | No | No | No | No | No | Checks if the code is running in an iOS simulator. | +| **getClipboardHtml** | Yes | Yes | Yes | Yes | Yes | Yes | Retrieves HTML content from the system clipboard. | +| **copyHtmlToClipboard** | Yes | Yes | Yes | No | Yes | Yes | Copies HTML content to the system clipboard. | +| **copyImageToClipboard** | Yes | Yes | Yes | No | Yes | Yes | Copies an image to the system clipboard. | +| **getClipboardImage** | Yes | Yes | Yes | No | Yes | Yes | Retrieves an image from the system clipboard. | +| **getClipboardGif** | Yes | Yes | No | No | No | No | Retrieves a GIF from the system clipboard. | diff --git a/quill_native_bridge/quill_native_bridge/example/lib/main.dart b/quill_native_bridge/quill_native_bridge/example/lib/main.dart index 35d2d8585..ebe0ef1a2 100644 --- a/quill_native_bridge/quill_native_bridge/example/lib/main.dart +++ b/quill_native_bridge/quill_native_bridge/example/lib/main.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb; import 'package:flutter/material.dart'; import 'package:quill_native_bridge/quill_native_bridge.dart' - show QuillNativeBridge, QuillNativeBridgePlatformFeature; + show QuillNativeBridge, QuillNativeBridgeFeature; import 'assets.dart'; @@ -42,7 +42,7 @@ class Buttons extends StatelessWidget { const SizedBox(height: 50), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.isIOSSimulator, + QuillNativeBridgeFeature.isIOSSimulator, context: context, ), label: const Text('Is iOS Simulator'), @@ -50,7 +50,7 @@ class Buttons extends StatelessWidget { ), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.getClipboardHtml, + QuillNativeBridgeFeature.getClipboardHtml, context: context, ), label: const Text('Get HTML from Clipboard'), @@ -58,7 +58,7 @@ class Buttons extends StatelessWidget { ), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.copyHtmlToClipboard, + QuillNativeBridgeFeature.copyHtmlToClipboard, context: context, ), label: const Text('Copy HTML to Clipboard'), @@ -66,7 +66,7 @@ class Buttons extends StatelessWidget { ), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.copyImageToClipboard, + QuillNativeBridgeFeature.copyImageToClipboard, context: context, ), label: const Text('Copy Image to Clipboard'), @@ -74,7 +74,7 @@ class Buttons extends StatelessWidget { ), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.getClipboardImage, + QuillNativeBridgeFeature.getClipboardImage, context: context, ), label: const Text('Retrieve Image from Clipboard'), @@ -82,7 +82,7 @@ class Buttons extends StatelessWidget { ), ElevatedButton.icon( onPressed: () => _onButtonClick( - QuillNativeBridgePlatformFeature.getClipboardGif, + QuillNativeBridgeFeature.getClipboardGif, context: context, ), label: const Text('Retrieve Gif from Clipboard'), @@ -93,14 +93,16 @@ class Buttons extends StatelessWidget { } Future _onButtonClick( - QuillNativeBridgePlatformFeature platformFeature, { + QuillNativeBridgeFeature feature, { required BuildContext context, }) async { - final isFeatureUnsupported = platformFeature.isUnsupported; - final isFeatureWebUnsupported = !platformFeature.hasWebSupport && kIsWeb; final scaffoldMessenger = ScaffoldMessenger.of(context); - switch (platformFeature) { - case QuillNativeBridgePlatformFeature.isIOSSimulator: + + final isFeatureUnsupported = + !(await QuillNativeBridge.isSupported(feature)); + final isFeatureWebUnsupported = isFeatureUnsupported && kIsWeb; + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported @@ -114,7 +116,7 @@ class Buttons extends StatelessWidget { ? "You're running the app on iOS simulator" : "You're running the app on real iOS device."); break; - case QuillNativeBridgePlatformFeature.getClipboardHtml: + case QuillNativeBridgeFeature.getClipboardHtml: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported @@ -135,7 +137,7 @@ class Buttons extends StatelessWidget { ); debugPrint('HTML from the clipboard: $result'); break; - case QuillNativeBridgePlatformFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyHtmlToClipboard: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported @@ -156,7 +158,7 @@ class Buttons extends StatelessWidget { 'HTML copied to the clipboard: $html', ); break; - case QuillNativeBridgePlatformFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported @@ -185,7 +187,7 @@ class Buttons extends StatelessWidget { 'Image has been copied to the clipboard.', ); break; - case QuillNativeBridgePlatformFeature.getClipboardImage: + case QuillNativeBridgeFeature.getClipboardImage: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported @@ -211,7 +213,7 @@ class Buttons extends StatelessWidget { ), ); break; - case QuillNativeBridgePlatformFeature.getClipboardGif: + case QuillNativeBridgeFeature.getClipboardGif: if (isFeatureUnsupported) { scaffoldMessenger.showText( isFeatureWebUnsupported diff --git a/quill_native_bridge/quill_native_bridge/lib/quill_native_bridge.dart b/quill_native_bridge/quill_native_bridge/lib/quill_native_bridge.dart index 4165f179e..5e6dae9e3 100644 --- a/quill_native_bridge/quill_native_bridge/lib/quill_native_bridge.dart +++ b/quill_native_bridge/quill_native_bridge/lib/quill_native_bridge.dart @@ -5,9 +5,8 @@ import 'package:flutter/foundation.dart' import 'package:quill_native_bridge_platform_interface/quill_native_bridge_platform_interface.dart'; -// TODO: Might move platform feature check outside of quill_native_bridge_platform_interface -// to allow the implementation of QuillNativeBridgePlatform to have a different check. -export 'package:quill_native_bridge_platform_interface/src/platform_feature.dart'; +export 'package:quill_native_bridge_platform_interface/src/platform_feature.dart' + show QuillNativeBridgeFeature; /// An internal plugin for [`flutter_quill`](https://pub.dev/packages/flutter_quill) /// package to access platform-specific APIs. @@ -25,6 +24,23 @@ class QuillNativeBridge { /// is [TargetPlatform.iOS] and [kIsWeb] is `false`. static Future isIOSSimulator() => _platform.isIOSSimulator(); + /// Checks if the specified [feature] is supported in the current implementation. + /// + /// Will verify if this is supported in the platform itself: + /// + /// - If [feature] is supported on **Android API 21** (as an example) and the + /// current Android API is `19` then will return `false` + /// - If [feature] is supported on the web if Clipboard API (as another example) + /// available in the current browser, and the current browser doesn't support it, + /// will return `false` too. For this specific example, you will need + /// to fallback to **Clipboard events** on **Firefox** or browsers that doesn't + /// support **Clipboard API**. + /// + /// Always check the docs of the method you're calling to see if there + /// are special notes. + static Future isSupported(QuillNativeBridgeFeature feature) => + _platform.isSupported(feature); + /// Return HTML from the Clipboard. /// /// **Important for web**: If [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) diff --git a/quill_native_bridge/quill_native_bridge/pubspec.yaml b/quill_native_bridge/quill_native_bridge/pubspec.yaml index ebb673bde..a6e1df4fd 100644 --- a/quill_native_bridge/quill_native_bridge/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge description: "An internal plugin for flutter_quill package to access platform-specific APIs" -version: 10.7.6 +version: 10.7.7 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -21,13 +21,13 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_android: ^0.0.1-dev.0 - quill_native_bridge_platform_interface: ^0.0.1-dev.0 - quill_native_bridge_web: ^0.0.1-dev.1 - quill_native_bridge_windows: ^0.0.1-dev.0 - quill_native_bridge_linux: ^0.0.1-dev.0 - quill_native_bridge_ios: ^0.0.1-dev.0 - quill_native_bridge_macos: ^0.0.1-dev.0 + quill_native_bridge_android: ^0.0.1-dev.1 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 + quill_native_bridge_web: ^0.0.1-dev.2 + quill_native_bridge_windows: ^0.0.1-dev.1 + quill_native_bridge_linux: ^0.0.1-dev.1 + quill_native_bridge_ios: ^0.0.1-dev.1 + quill_native_bridge_macos: ^0.0.1-dev.1 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_android/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_android/CHANGELOG.md index f3225b75a..13b5ca517 100644 --- a/quill_native_bridge/quill_native_bridge_android/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_android/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 0.0.1-dev.0 - Initial experimental release. WIP in https://github.com/singerdmx/flutter-quill/pull/2230. Not intended for public use as breaking changes will occur. \ No newline at end of file diff --git a/quill_native_bridge/quill_native_bridge_android/lib/quill_native_bridge_android.dart b/quill_native_bridge/quill_native_bridge_android/lib/quill_native_bridge_android.dart index c6472c09d..dbf196036 100644 --- a/quill_native_bridge/quill_native_bridge_android/lib/quill_native_bridge_android.dart +++ b/quill_native_bridge/quill_native_bridge_android/lib/quill_native_bridge_android.dart @@ -35,6 +35,25 @@ class QuillNativeBridgeAndroid extends QuillNativeBridgePlatform { QuillNativeBridgePlatform.instance = QuillNativeBridgeAndroid._(); } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + return false; + case QuillNativeBridgeFeature.getClipboardHtml: + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + case QuillNativeBridgeFeature.getClipboardGif: + return true; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on Android is not covered.', + ); + } + } + @override Future getClipboardHtml() async => _hostApi.getClipboardHtml(); diff --git a/quill_native_bridge/quill_native_bridge_android/pubspec.yaml b/quill_native_bridge/quill_native_bridge_android/pubspec.yaml index f0dfbbc62..d3b568946 100644 --- a/quill_native_bridge/quill_native_bridge_android/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_android/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_android description: "Android implementation of the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.1 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_android repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_android issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -13,7 +13,7 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_ios/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_ios/CHANGELOG.md index f3225b75a..13b5ca517 100644 --- a/quill_native_bridge/quill_native_bridge_ios/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_ios/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 0.0.1-dev.0 - Initial experimental release. WIP in https://github.com/singerdmx/flutter-quill/pull/2230. Not intended for public use as breaking changes will occur. \ No newline at end of file diff --git a/quill_native_bridge/quill_native_bridge_ios/lib/quill_native_bridge_ios.dart b/quill_native_bridge/quill_native_bridge_ios/lib/quill_native_bridge_ios.dart index d6f34c4ce..a5fc7364c 100644 --- a/quill_native_bridge/quill_native_bridge_ios/lib/quill_native_bridge_ios.dart +++ b/quill_native_bridge/quill_native_bridge_ios/lib/quill_native_bridge_ios.dart @@ -34,6 +34,24 @@ class QuillNativeBridgeIos extends QuillNativeBridgePlatform { QuillNativeBridgePlatform.instance = QuillNativeBridgeIos._(); } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + case QuillNativeBridgeFeature.getClipboardHtml: + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + case QuillNativeBridgeFeature.getClipboardGif: + return true; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on iOS is not covered.', + ); + } + } + @override Future isIOSSimulator() => _hostApi.isIosSimulator(); diff --git a/quill_native_bridge/quill_native_bridge_ios/pubspec.yaml b/quill_native_bridge/quill_native_bridge_ios/pubspec.yaml index a3b5edd69..3007ad345 100644 --- a/quill_native_bridge/quill_native_bridge_ios/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_ios/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_ios description: "iOS implementation of the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.1 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_ios repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_ios issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -13,7 +13,7 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_linux/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_linux/CHANGELOG.md index 167a42b26..13b5ca517 100644 --- a/quill_native_bridge/quill_native_bridge_linux/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_linux/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. ## 0.0.1-dev.0 diff --git a/quill_native_bridge/quill_native_bridge_linux/lib/quill_native_bridge_linux.dart b/quill_native_bridge/quill_native_bridge_linux/lib/quill_native_bridge_linux.dart index a07d35ca1..ca34ae16f 100644 --- a/quill_native_bridge/quill_native_bridge_linux/lib/quill_native_bridge_linux.dart +++ b/quill_native_bridge/quill_native_bridge_linux/lib/quill_native_bridge_linux.dart @@ -32,6 +32,26 @@ class QuillNativeBridgeLinux extends QuillNativeBridgePlatform { QuillNativeBridgePlatform.instance = QuillNativeBridgeLinux._(); } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + return false; + case QuillNativeBridgeFeature.getClipboardHtml: + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + return true; + case QuillNativeBridgeFeature.getClipboardGif: + return false; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on Linux is not covered.', + ); + } + } + // TODO: Improve error handling // TODO: The xclipFile should always be removed in finally block, extractBinaryFromAsset() diff --git a/quill_native_bridge/quill_native_bridge_linux/pubspec.yaml b/quill_native_bridge/quill_native_bridge_linux/pubspec.yaml index c5f1e8ae6..3ec65aa4d 100644 --- a/quill_native_bridge/quill_native_bridge_linux/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_linux/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_linux description: "Linux implementation of the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.1 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_linux repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_linux issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -13,7 +13,7 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_macos/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_macos/CHANGELOG.md index f3225b75a..13b5ca517 100644 --- a/quill_native_bridge/quill_native_bridge_macos/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_macos/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 0.0.1-dev.0 - Initial experimental release. WIP in https://github.com/singerdmx/flutter-quill/pull/2230. Not intended for public use as breaking changes will occur. \ No newline at end of file diff --git a/quill_native_bridge/quill_native_bridge_macos/lib/quill_native_bridge_macos.dart b/quill_native_bridge/quill_native_bridge_macos/lib/quill_native_bridge_macos.dart index 955092ba1..c48d98169 100644 --- a/quill_native_bridge/quill_native_bridge_macos/lib/quill_native_bridge_macos.dart +++ b/quill_native_bridge/quill_native_bridge_macos/lib/quill_native_bridge_macos.dart @@ -34,6 +34,26 @@ class QuillNativeBridgeMacOS extends QuillNativeBridgePlatform { QuillNativeBridgePlatform.instance = QuillNativeBridgeMacOS._(); } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + return false; + case QuillNativeBridgeFeature.getClipboardHtml: + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + return true; + case QuillNativeBridgeFeature.getClipboardGif: + return false; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on macOS is not covered.', + ); + } + } + @override Future isIOSSimulator() => throw UnsupportedError( 'isIOSSimulator() is only supported on iOS.', diff --git a/quill_native_bridge/quill_native_bridge_macos/pubspec.yaml b/quill_native_bridge/quill_native_bridge_macos/pubspec.yaml index d1078ca07..00c8a7279 100644 --- a/quill_native_bridge/quill_native_bridge_macos/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_macos/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_macos description: "macOS implementation of the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.1 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_macos repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_macos issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -13,7 +13,7 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_platform_interface/CHANGELOG.md index 167a42b26..9ccec2f2d 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_platform_interface/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.2 + +- Identical to `0.0.1-dev.1` + +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. ## 0.0.1-dev.0 diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/lib/quill_native_bridge_platform_interface.dart b/quill_native_bridge/quill_native_bridge_platform_interface/lib/quill_native_bridge_platform_interface.dart index b132d32d1..7316bb618 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/lib/quill_native_bridge_platform_interface.dart +++ b/quill_native_bridge/quill_native_bridge_platform_interface/lib/quill_native_bridge_platform_interface.dart @@ -1,8 +1,11 @@ import 'package:flutter/foundation.dart' show Uint8List; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; +import 'src/platform_feature.dart'; import 'src/quill_native_bridge_method_channel.dart'; +export 'src/platform_feature.dart'; + /// **Experimental** as breaking changes can occur. /// /// Platform implementations should extend this class rather than implement it @@ -37,6 +40,23 @@ abstract class QuillNativeBridgePlatform extends PlatformInterface { _instance = instance; } + /// Checks if the specified [feature] is supported in the current implementation. + /// + /// Will verify if this is supported in the platform itself: + /// + /// - If [feature] is supported on **Android API 21** (as an example) and the + /// current Android API is `19` then will return `false` + /// - If [feature] is supported on the web if Clipboard API (as another example) + /// available in the current browser, and the current browser doesn't support it, + /// will return `false` too. For this specific example, you will need + /// to fallback to **Clipboard events** on **Firefox** or browsers that doesn't + /// support **Clipboard API**. + /// + /// Always check the docs of the method you're calling to see if there + /// are special notes. + Future isSupported(QuillNativeBridgeFeature feature) => + throw UnimplementedError('isSupported() has not been implemented.'); + /// Check if the app is running on [iOS Simulator](https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device). Future isIOSSimulator() => throw UnimplementedError('isIOSSimulator() has not been implemented.'); diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/platform_feature.dart b/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/platform_feature.dart index 2395bdec4..120c3636b 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/platform_feature.dart +++ b/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/platform_feature.dart @@ -1,82 +1,81 @@ -import 'package:flutter/foundation.dart' - show TargetPlatform, defaultTargetPlatform, kIsWeb; +/// The platform features provided by the plugin +enum QuillNativeBridgeFeature { + isIOSSimulator(), + getClipboardHtml(), + copyHtmlToClipboard(), + copyImageToClipboard(), + getClipboardImage(), + getClipboardGif(); -/// The features/methods provided by the plugin -enum QuillNativeBridgePlatformFeature { - isIOSSimulator(hasWebSupport: false), - getClipboardHtml(hasWebSupport: true), - copyHtmlToClipboard(hasWebSupport: true), - copyImageToClipboard(hasWebSupport: true), - getClipboardImage(hasWebSupport: true), - getClipboardGif(hasWebSupport: false); + const QuillNativeBridgeFeature(); - const QuillNativeBridgePlatformFeature({required this.hasWebSupport}); + // TODO: Remove those comments later - /// Verify if this feature is supported on web regardless of the [TargetPlatform]. - /// - /// **Note**: This doesn't check whatever if the web browser support this - /// specific feature. - /// - /// For example the **Clipboard API** might not be supported on **Firefox** - /// but is supported on the web itself in general, the [hasWebSupport] - /// will return `true`. - /// - /// Always check the docs of the method you're calling to see if there - /// are special notes. For this specific example, you will need - /// to fallback to **Clipboard events** on **Firefox** or browsers that doesn't - /// support **Clipboard API**. - final bool hasWebSupport; + // /// Verify if this feature is supported on web regardless of the [TargetPlatform]. + // /// + // /// **Note**: This doesn't check whatever if the web browser support this + // /// specific feature. + // /// + // /// For example the **Clipboard API** might not be supported on **Firefox** + // /// but is supported on the web itself in general, the [hasWebSupport] + // /// will return `true`. + // /// + // /// Always check the docs of the method you're calling to see if there + // /// are special notes. For this specific example, you will need + // /// to fallback to **Clipboard events** on **Firefox** or browsers that doesn't + // /// support **Clipboard API**. + // final bool hasWebSupport; - /// Verify whether a specific feature is supported by the plugin for the [TargetPlatform]. - /// - /// **Note**: This doesn't check if the platform operating system does support - /// this feature. It only check if this feature is supported - /// on a specific platform (e.g. **Android** or **iOS**). - /// - /// If feature A is not supported on **Android API 21** (for example), - /// then the [isSupported] doesn't cover this case. - /// - /// Always check the docs of the method you're calling to see if there - /// are special notes. - bool get isSupported { - if (kIsWeb) { - return hasWebSupport; - } - return switch (this) { - QuillNativeBridgePlatformFeature.isIOSSimulator => - !kIsWeb && defaultTargetPlatform == TargetPlatform.iOS, - QuillNativeBridgePlatformFeature.getClipboardHtml => { - TargetPlatform.android, - TargetPlatform.iOS, - TargetPlatform.macOS, - TargetPlatform.windows, - TargetPlatform.linux, - }.contains(defaultTargetPlatform), - QuillNativeBridgePlatformFeature.copyHtmlToClipboard => { - TargetPlatform.android, - TargetPlatform.iOS, - TargetPlatform.macOS, - TargetPlatform.linux, - }.contains(defaultTargetPlatform), - QuillNativeBridgePlatformFeature.copyImageToClipboard => { - TargetPlatform.android, - TargetPlatform.iOS, - TargetPlatform.macOS, - TargetPlatform.linux, - }.contains(defaultTargetPlatform), - QuillNativeBridgePlatformFeature.getClipboardImage => { - TargetPlatform.android, - TargetPlatform.iOS, - TargetPlatform.macOS, - TargetPlatform.linux, - }.contains(defaultTargetPlatform), - QuillNativeBridgePlatformFeature.getClipboardGif => { - TargetPlatform.android, - TargetPlatform.iOS - }.contains(defaultTargetPlatform), - }; - } + // /// Verify whether a specific feature is supported by the plugin for the [TargetPlatform]. + // /// + // /// **Note**: This doesn't check if the platform operating system does support + // /// this feature. It only check if this feature is supported + // /// on a specific platform (e.g. **Android** or **iOS**). + // /// + // /// If feature A is not supported on **Android API 21** (for example), + // /// then the [isSupported] doesn't cover this case. + // /// + // /// Always check the docs of the method you're calling to see if there + // /// are special notes. + // bool get isSupported { + // if (kIsWeb) { + // return hasWebSupport; + // } + // return switch (this) { + // QuillNativeBridgeFeature.isIOSSimulator => + // !kIsWeb && defaultTargetPlatform == TargetPlatform.iOS, + // QuillNativeBridgeFeature.getClipboardHtml => { + // TargetPlatform.android, + // TargetPlatform.iOS, + // TargetPlatform.macOS, + // TargetPlatform.windows, + // TargetPlatform.linux, + // }.contains(defaultTargetPlatform), + // QuillNativeBridgeFeature.copyHtmlToClipboard => { + // TargetPlatform.android, + // TargetPlatform.iOS, + // TargetPlatform.macOS, + // TargetPlatform.linux, + // }.contains(defaultTargetPlatform), + // QuillNativeBridgeFeature.copyImageToClipboard => { + // TargetPlatform.android, + // TargetPlatform.iOS, + // TargetPlatform.macOS, + // TargetPlatform.linux, + // }.contains(defaultTargetPlatform), + // QuillNativeBridgeFeature.getClipboardImage => { + // TargetPlatform.android, + // TargetPlatform.iOS, + // TargetPlatform.macOS, + // TargetPlatform.linux, + // }.contains(defaultTargetPlatform), + // QuillNativeBridgeFeature.getClipboardGif => { + // TargetPlatform.android, + // TargetPlatform.iOS + // }.contains(defaultTargetPlatform), + // }; + // } - /// Negation of [isSupported] - bool get isUnsupported => !isSupported; + // /// Negation of [isSupported] + // bool get isUnsupported => !isSupported; } diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/quill_native_bridge_method_channel.dart b/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/quill_native_bridge_method_channel.dart index 421e390a5..b1fc96ade 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/quill_native_bridge_method_channel.dart +++ b/quill_native_bridge/quill_native_bridge_platform_interface/lib/src/quill_native_bridge_method_channel.dart @@ -6,11 +6,9 @@ import 'package:flutter/services.dart' show MethodChannel; import '../quill_native_bridge_platform_interface.dart'; import 'platform_feature.dart'; -// TODO: This was only for iOS, Android, and macOS, now it's no longer needed -// for Android, will be no longer used for iOS and macOS either soon. - -// TODO: Platform-specific check like if this is supported should be removed from -// here as discussed in https://github.com/singerdmx/flutter-quill/pull/2230 +// TODO: This class is no longer used for implementations that use method channel. +// Instead each platform (e.g. Android) have their own implementation which might +// or might not use method channel, might remove this class completely const _methodChannel = MethodChannel('quill_native_bridge'); @@ -38,10 +36,19 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { return _methodChannel; } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + final isSupported = await _methodChannel.invokeMethod( + 'isSupported', + feature.name, + ); + return isSupported ?? false; + } + @override Future isIOSSimulator() async { assert(() { - if (QuillNativeBridgePlatformFeature.isIOSSimulator.isUnsupported) { + if (defaultTargetPlatform != TargetPlatform.iOS || kIsWeb) { throw FlutterError( 'isIOSSimulator() method should be called only on iOS.', ); @@ -63,14 +70,6 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { @override Future getClipboardHtml() async { - assert(() { - if (QuillNativeBridgePlatformFeature.getClipboardHtml.isUnsupported) { - throw FlutterError( - 'getClipboardHtml() is currently not supported on $defaultTargetPlatform.', - ); - } - return true; - }()); final htmlText = await _methodChannel.invokeMethod('getClipboardHtml'); return htmlText; @@ -78,14 +77,6 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { @override Future copyHtmlToClipboard(String html) async { - assert(() { - if (QuillNativeBridgePlatformFeature.copyHtmlToClipboard.isUnsupported) { - throw FlutterError( - 'copyHtmlToClipboard() is currently not supported on $defaultTargetPlatform.', - ); - } - return true; - }()); await _methodChannel.invokeMethod( 'copyHtmlToClipboard', html, @@ -94,14 +85,6 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { @override Future copyImageToClipboard(Uint8List imageBytes) async { - assert(() { - if (QuillNativeBridgePlatformFeature.copyImageToClipboard.isUnsupported) { - throw FlutterError( - 'copyImageToClipboard() is currently not supported on $defaultTargetPlatform.', - ); - } - return true; - }()); await _methodChannel.invokeMethod( 'copyImageToClipboard', imageBytes, @@ -112,14 +95,6 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { @override Future getClipboardImage() async { - assert(() { - if (QuillNativeBridgePlatformFeature.getClipboardImage.isUnsupported) { - throw FlutterError( - 'getClipboardImage() is currently not supported on $defaultTargetPlatform.', - ); - } - return true; - }()); final imageBytes = await _methodChannel.invokeMethod( 'getClipboardImage', ); @@ -128,14 +103,6 @@ class MethodChannelQuillNativeBridge implements QuillNativeBridgePlatform { @override Future getClipboardGif() async { - assert(() { - if (QuillNativeBridgePlatformFeature.getClipboardGif.isUnsupported) { - throw FlutterError( - 'getClipboardGif() is currently not supported on $defaultTargetPlatform.', - ); - } - return true; - }()); final gifBytes = await _methodChannel.invokeMethod( 'getClipboardGif', ); diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/pubspec.yaml b/quill_native_bridge/quill_native_bridge_platform_interface/pubspec.yaml index 34ccd1e71..d271109cb 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_platform_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_platform_interface description: "A common platform interface for the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.2 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_platform_interface repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_platform_interface issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/quill_native_bridge/quill_native_bridge_platform_interface/test/quill_native_bridge_test.dart b/quill_native_bridge/quill_native_bridge_platform_interface/test/quill_native_bridge_test.dart index a3c3110d4..2a19639b5 100644 --- a/quill_native_bridge/quill_native_bridge_platform_interface/test/quill_native_bridge_test.dart +++ b/quill_native_bridge/quill_native_bridge_platform_interface/test/quill_native_bridge_test.dart @@ -2,11 +2,17 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import 'package:quill_native_bridge_platform_interface/quill_native_bridge_platform_interface.dart'; +import 'package:quill_native_bridge_platform_interface/src/platform_feature.dart'; import 'package:quill_native_bridge_platform_interface/src/quill_native_bridge_method_channel.dart'; class MockQuillNativeBridgePlatform with MockPlatformInterfaceMixin implements QuillNativeBridgePlatform { + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + return false; + } + @override Future isIOSSimulator() async => false; diff --git a/quill_native_bridge/quill_native_bridge_web/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_web/CHANGELOG.md index 58e751774..600d2ca05 100644 --- a/quill_native_bridge/quill_native_bridge_web/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_web/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.2 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 0.0.1-dev.1 - Initial experimental release. WIP in https://github.com/singerdmx/flutter-quill/pull/2230. Not intended for public use as breaking changes will occur. diff --git a/quill_native_bridge/quill_native_bridge_web/lib/quill_native_bridge_web.dart b/quill_native_bridge/quill_native_bridge_web/lib/quill_native_bridge_web.dart index 4ced585df..6d8349400 100644 --- a/quill_native_bridge/quill_native_bridge_web/lib/quill_native_bridge_web.dart +++ b/quill_native_bridge/quill_native_bridge_web/lib/quill_native_bridge_web.dart @@ -30,6 +30,26 @@ class QuillNativeBridgeWeb extends QuillNativeBridgePlatform { QuillNativeBridgePlatform.instance = QuillNativeBridgeWeb._(); } + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + return false; + case QuillNativeBridgeFeature.getClipboardHtml: + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + return isClipboardApiSupported; + case QuillNativeBridgeFeature.getClipboardGif: + return false; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on the web is not covered.', + ); + } + } + @override Future getClipboardHtml() async { if (isClipbaordApiUnsupported) { diff --git a/quill_native_bridge/quill_native_bridge_web/pubspec.yaml b/quill_native_bridge/quill_native_bridge_web/pubspec.yaml index fe2bbe6c1..c745040d3 100644 --- a/quill_native_bridge/quill_native_bridge_web/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_web/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_web description: "Web platform implementation of quill_native_bridge" -version: 0.0.1-dev.1 +version: 0.0.1-dev.2 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_web repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_web issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -16,7 +16,7 @@ dependencies: flutter_web_plugins: sdk: flutter web: ^1.0.0 - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 dev_dependencies: flutter_test: diff --git a/quill_native_bridge/quill_native_bridge_windows/CHANGELOG.md b/quill_native_bridge/quill_native_bridge_windows/CHANGELOG.md index 167a42b26..eb3c50b72 100644 --- a/quill_native_bridge/quill_native_bridge_windows/CHANGELOG.md +++ b/quill_native_bridge/quill_native_bridge_windows/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. +## 0.0.1-dev.1 + +- Highly experimental changes in https://github.com/singerdmx/flutter-quill/pull/2230 (WIP). Not intended for public use as breaking changes will occur. Not stable yet. + ## 0.0.1-dev.0 - Initial experimental release. WIP in https://github.com/singerdmx/flutter-quill/pull/2230. Not intended for public use as breaking changes will occur. \ No newline at end of file diff --git a/quill_native_bridge/quill_native_bridge_windows/lib/quill_native_bridge_windows.dart b/quill_native_bridge/quill_native_bridge_windows/lib/quill_native_bridge_windows.dart index af90daf9f..b795dee4b 100644 --- a/quill_native_bridge/quill_native_bridge_windows/lib/quill_native_bridge_windows.dart +++ b/quill_native_bridge/quill_native_bridge_windows/lib/quill_native_bridge_windows.dart @@ -44,6 +44,26 @@ class QuillNativeBridgeWindows extends QuillNativeBridgePlatform { /// From [HTML Clipboard Format](https://docs.microsoft.com/en-us/windows/win32/dataxchg/html-clipboard-format). static const _kHtmlFormatName = 'HTML Format'; + @override + Future isSupported(QuillNativeBridgeFeature feature) async { + switch (feature) { + case QuillNativeBridgeFeature.isIOSSimulator: + return false; + case QuillNativeBridgeFeature.getClipboardHtml: + return true; + case QuillNativeBridgeFeature.copyHtmlToClipboard: + case QuillNativeBridgeFeature.copyImageToClipboard: + case QuillNativeBridgeFeature.getClipboardImage: + case QuillNativeBridgeFeature.getClipboardGif: + return false; + // Without this default check, adding new item to the enum will be a breaking change + default: + throw UnimplementedError( + 'Checking if `${feature.name}` is supported on Windows is not covered.', + ); + } + } + @override Future getClipboardHtml() async { if (OpenClipboard(NULL) == FALSE) { diff --git a/quill_native_bridge/quill_native_bridge_windows/pubspec.yaml b/quill_native_bridge/quill_native_bridge_windows/pubspec.yaml index 73c06dd42..b77e84b83 100644 --- a/quill_native_bridge/quill_native_bridge_windows/pubspec.yaml +++ b/quill_native_bridge/quill_native_bridge_windows/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_native_bridge_windows description: "Windows implementation of the quill_native_bridge plugin." -version: 0.0.1-dev.0 +version: 0.0.1-dev.1 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_windows repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_native_bridge/quill_native_bridge_windows issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ @@ -13,7 +13,7 @@ environment: dependencies: flutter: sdk: flutter - quill_native_bridge_platform_interface: ^0.0.1-dev.0 + quill_native_bridge_platform_interface: ^0.0.1-dev.2 win32: ^5.5.4 ffi: ^2.1.3