From d30d917c386a9094f8738eb1e107e56b1a806c12 Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Wed, 10 Jan 2024 23:29:10 +0800 Subject: [PATCH] support HarmonyOS --- CHANGELOG.md | 4 ++++ lib/src/extended_editable_text.dart | 2 ++ lib/src/extended_render_editable.dart | 2 ++ lib/src/extended_text_field.dart | 2 ++ pubspec.yaml | 2 +- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be30421..18520b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 11.0.1-ohos + +* support HarmonyOS + # 11.0.1 * fix issue on ios after flutter version 3.7.0. #191 #198 diff --git a/lib/src/extended_editable_text.dart b/lib/src/extended_editable_text.dart index 66219f8..c24102c 100644 --- a/lib/src/extended_editable_text.dart +++ b/lib/src/extended_editable_text.dart @@ -1104,6 +1104,7 @@ class ExtendedEditableText extends StatefulWidget { } break; case TargetPlatform.android: + case TargetPlatform.ohos: case TargetPlatform.fuchsia: case TargetPlatform.linux: case TargetPlatform.windows: @@ -1370,6 +1371,7 @@ class ExtendedEditableTextState extends State break; case TargetPlatform.macOS: case TargetPlatform.android: + case TargetPlatform.ohos: case TargetPlatform.fuchsia: case TargetPlatform.linux: case TargetPlatform.windows: diff --git a/lib/src/extended_render_editable.dart b/lib/src/extended_render_editable.dart index 9092f78..2dcafe9 100644 --- a/lib/src/extended_render_editable.dart +++ b/lib/src/extended_render_editable.dart @@ -1675,6 +1675,7 @@ class ExtendedRenderEditable extends ExtendedTextSelectionRenderObject { Rect.fromLTWH(0.0, 0.0, cursorWidth, cursorHeight + 2); break; case TargetPlatform.android: + case TargetPlatform.ohos: case TargetPlatform.fuchsia: case TargetPlatform.linux: case TargetPlatform.windows: @@ -2294,6 +2295,7 @@ class _FloatingCursorPainter extends ExtendedRenderEditablePainter { ); break; case TargetPlatform.android: + case TargetPlatform.ohos: case TargetPlatform.fuchsia: case TargetPlatform.linux: case TargetPlatform.windows: diff --git a/lib/src/extended_text_field.dart b/lib/src/extended_text_field.dart index 387f100..ae97561 100644 --- a/lib/src/extended_text_field.dart +++ b/lib/src/extended_text_field.dart @@ -1115,6 +1115,7 @@ class ExtendedTextFieldState extends State case TargetPlatform.windows: case TargetPlatform.fuchsia: case TargetPlatform.android: + case TargetPlatform.ohos: if (cause == SelectionChangedCause.drag) { _editableText?.bringIntoView(selection.extent); } @@ -1247,6 +1248,7 @@ class ExtendedTextFieldState extends State break; case TargetPlatform.android: + case TargetPlatform.ohos: case TargetPlatform.fuchsia: forcePressEnabled = false; textSelectionControls ??= materialTextSelectionControls; diff --git a/pubspec.yaml b/pubspec.yaml index 2678baf..e79fd02 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: extended_text_field description: Extended official text field to build special text like inline image, @somebody, custom background etc quickly.It also support to build custom seleciton toolbar and handles. -version: 11.0.1 +version: 11.0.1-ohos homepage: https://github.com/fluttercandies/extended_text_field environment: