psovit / rich_code_editor Goto Github PK
View Code? Open in Web Editor NEWA Flutter based code editor
License: Other
A Flutter based code editor
License: Other
Compiler message:
../../../../soft/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-0.2.8/lib/code_editor/widgets/code_editable_text.dart:1388:11: Error: Getter not found: 'kMinInteractiveSize'.
kMinInteractiveSize,
^^^^^^^^^^^^^^^^^^^
../../../../soft/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-0.2.8/lib/code_editor/widgets/code_editable_text.dart:1388:11: Error: The getter 'kMinInteractiveSize' isn't defined for the class 'CodeEditableTextState'.
- 'CodeEditableTextState' is from 'package:rich_code_editor/code_editor/widgets/code_editable_text.dart' ('../../../../soft/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-0.2.8/lib/code_editor/widgets/code_editable_text.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'kMinInteractiveSize'.
kMinInteractiveSize,
^^^^^^^^^^^^^^^^^^^
I/flutter (30091): Receiver: null
I/flutter (30091): Tried calling: hasFloatingPlaceholder
I/flutter (30091):
I/flutter (30091): User-created ancestor of the error-causing widget was:
I/flutter (30091): CodeTextField
I/flutter (30091):
I/flutter (30091): When the exception was thrown, this was the stack:
I/flutter (30091): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
I/flutter (30091): #1 _InputDecoratorState.initState (package:flutter/src/material/input_decorator.dart:1851:33)
I/flutter (30091): #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4060:58)
I/flutter (30091): #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3911:5)
I/flutter (30091): #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3093:14)
I/flutter (30091): #5 Element.updateChild (package:flutter/src/widgets/framework.dart:2896:12)
...
Flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.8.3, on Microsoft Windows [Version 10.0.18362.295], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[√] Android Studio (version 3.4)
[√] Android Studio (version 3.5)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
! Doctor found issues in 1 category.
Simply: Does the syntax highlighting support JSON?
/C:/package/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-1.0.0/lib/rich_code_controller.dart:6:7: Error: The non-abstract class 'RichCodeEditingController' is missing implementations for these members:
class RichCodeEditingController extends ValueNotifier implements TextEditingController {
^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/package/flutter/packages/flutter/lib/src/widgets/editable_text.dart:229:8: Context: 'TextEditingController.isSelectionWithinTextBounds' is defined here.
bool isSelectionWithinTextBounds(TextSelection selection) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/package/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-1.0.0/lib/rich_editable_code.dart:1617:34: Error: Too few positional arguments: 2 required, 1 given.
? () => controls.handleCopy(this)
^
/C:/package/flutter/.pub-cache/hosted/pub.dartlang.org/rich_code_editor-1.0.0/lib/rich_editable_code.dart:1705:29: Error: Getter not found: 'obscuringCharacter'.
text = RenderEditable.obscuringCharacter * text.length;
^^^^^^^^^^^^^^^^^^
2
FAILURE: Build failed with an exception.
Thank you for developing this.
It would be nice to support desktop as well.
Hello
I have noticed that text manipulation gestures do not seem to work on Android.
For example, double tapping a word on the default material TextField
highlights that word.
On a CodeTextField
, the cursor just moves to the beginning of the word without highlighting it.
Similarly, tapping and holding a word does nothing but move the cursor to the beginning.
Also, this may be Android related only, but on some keyboards there are text gestures such as:
Sliding across the spacebar to move the cursor and dragging the backspace to the left to delete multiple words.
The functionality works (sliding the the spacebar does move the cursor's underlying position, and sliding the backspace does delete multiple words) however there's no visual feedback.
Sliding backspace should highlight words-to-be-deleted before it deletes them, and sliding across the spacebar should move the blinking cursor as its position is being changed.
I was using my own Highlighter, but tested with the provided DummyHighlighter
and the behaviour is still missing. Any thoughts?
Thanks for the great work by the way!
rich_code_editor version: 0.2.9
flutter version: 1.7.8+hotfix 3
device: Pixel 2XL running Android 10 (QP1A. 191105)
flutter doctor -v
:
PS C:\Development\Flutter\project> flutter doctor -v
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.18362.476], locale en-GB)
• Flutter version 1.7.8+hotfix.3 at C:\sdk\flutter
• Framework revision b712a172f9 (5 months ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Program Files (x86)\Android\android-sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: c:\programdata\Oracle\Java\javapath\java.exe
• Java version Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
[√] VS Code (version 1.40.1)
• VS Code at C:\Users\Faris\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.6.0
[√] Connected device (1 available)
• Pixel 2 XL • 711KPPB0677296 • android-arm64 • Android 10 (API 29)
! Doctor found issues in 2 categories.
So I dug a bit into the code and found that the library has its own implementation of TextSelectionControls
, and nothing but Paste
is supported, how come? What's the reason behind this?
I am trying to manipulate this so that the code does NOT wrap automatically, and instead overflows horizontally so that a user can scroll horizontally.
Error: The non-abstract class 'RichCodeEditingController' is missing implementations for these members:
- TextEditingController.isSelectionWithinTextBounds
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class RichCodeEditingController extends ValueNotifier<TextEditingValue> implements TextEditingController {
^^^^^^^^^^^^^^^^^^^^^^^^^
/D:/flutter/packages/flutter/lib/src/widgets/editable_text.dart:225:8: Context: 'TextEditingController.isSelectionWithinTextBounds' is defined `here.`
bool isSelectionWithinTextBounds(TextSelection selection) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^``
While editing a huge chunk of code, the editor becomes quite slow, probably due to the fact that on every keyPress/change, the syntax highlighting is recalculated for the whole text.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.