Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when will the Flutter-Quill SDK be adapted for the HarmonyOS system? #2392

Closed
1 task done
wangjinshan opened this issue Nov 22, 2024 · 5 comments
Closed
1 task done
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@wangjinshan
Copy link

Is there an existing issue for this?

The question

"Hi, when will the Flutter-Quill SDK be adapted for the HarmonyOS system? I need to inform someone about the timeline for its release."

"We urgently need the Flutter-Quill SDK to be adapted for the HarmonyOS system."

Hope this helps!

@wangjinshan wangjinshan added the question Further information is requested label Nov 22, 2024
@EchoEllet
Copy link
Collaborator

EchoEllet commented Nov 22, 2024

Duplicate of #2389

There is no ETA, and we currently don't have a plan for it. Supporting desktop, mobile, and web platforms is already expensive as it's, I prefer to provide better support for current platforms and enhance functionality than adding support for a new platform.

The TargetPlatform is part of the Flutter SDK. This is a package target of the Flutter SDK. How can we support HarmonyOS? We can't change the target SDK to a modified version to support a new target platform. Providing another version of flutter_quill is also not something we plan on.

We urgently need the Flutter-Quill SDK to be adapted for the HarmonyOS system

You can fork the project, adjust it, and use the fork as a git package in pubspec.yaml. Flutter Quill is a library.

Can you give me example packages that support it?

@wangjinshan
Copy link
Author

Subject: Assistance Required for Adapting Flutter Version for HarmonyOS

Dear quill

I hope this email finds you well.

We are currently working on adapting the Flutter version available at [https://gitee.com/harmonycommando_flutter/flutter] for HarmonyOS. However, we have encountered some issues with two specific files: delegate.dart and text_selection.dart.

We are unsure how to adapt these files for the HarmonyOS system. Below are the errors we are facing:

❯ flutter build hap
start hap build...
../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:269:13:
Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
'TargetPlatform.ohos'.

  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:479:13:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:625:13:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:679:15:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:693:15:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:803:17:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/delegate.dart:843:15:
    Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/text/text_selection.dart:91
    1:13: Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_quill-10.8.5/lib/src/editor/widgets/text/text_selection.dart:10
    68:15: Error: The type 'TargetPlatform' is not exhaustively matched by the switch cases since it doesn't match
    'TargetPlatform.ohos'.
  • 'TargetPlatform' is from 'package:flutter/src/foundation/platform.dart'
    ('../../../ohos/flutter/packages/flutter/lib/src/foundation/platform.dart').
    Try adding a default case or cases that match 'TargetPlatform.ohos'.
    switch (defaultTargetPlatform) {
    ^
    Target kernel_snapshot failed: Exception
    #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:279:7)
#1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:875:9) #2 Future.wait. (dart:async/future.dart:524:21) #3 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32) #4 Future.wait. (dart:async/future.dart:524:21) #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32) #6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:642:16) #7 flutterAssemble (package:flutter_tools/src/ohos/hvigor.dart:306:32) #8 OhosHvigorBuilder.flutterBuildPre (package:flutter_tools/src/ohos/hvigor.dart:543:27) #9 OhosHvigorBuilder.buildApplicationPipeLine (package:flutter_tools/src/ohos/hvigor.dart:681:5) #10 OhosHvigorBuilder.buildHap (package:flutter_tools/src/ohos/hvigor.dart:479:5) #11 BuildHapCommand.runCommand (package:flutter_tools/src/commands/build_hap.dart:80:5) #12 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1394:27) #13 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #14 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #15 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:372:9) #16 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #17 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5) #18 run.. (package:flutter_tools/runner.dart:130:9) #19 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #20 main (package:flutter_tools/executable.dart:93:3)

Error: Failed to compile application for the Ohos.
Running Hvigor task assembleHap... ⣤%

Could you please provide guidance or examples on how to properly adapt these files for HarmonyOS?

Thank you for your assistance.

Best regards,

@wangjinshan
Copy link
Author

@EchoEllet

@EchoEllet
Copy link
Collaborator

  • switch (defaultTargetPlatform)

I don't know anything about HarmonyOS though it probably has a similar behavior to Android, a workaround:

switch (defaultTargetPlatform) {
  case TargetPlatform.android:
  case TargetPlatform.ohos:
  // Assuming HarmonyOS has the same behavior as Android...
  break;
}

The project uses plugins and dependencies that don't support HarmonyOS yet, so it will probably have broken behavior and buggy.

@EchoEllet
Copy link
Collaborator

We are currently working on adapting the Flutter version available at [https://gitee.com/harmonycommando_flutter/flutter] for HarmonyOS. However, we have encountered some issues with two specific files: delegate.dart and text_selection.dart.

This seems to be the same issue as #2389, closing as duplicate. Continue the discussion in there.

@EchoEllet EchoEllet closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2024
@EchoEllet EchoEllet added the duplicate This issue or pull request already exists label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants