rich_code_editor 0.2.9

  • Readme
  • Changelog
  • Example
  • Installing
  • 78

rich_code_editor #

A simple package that supports creating code editors in Flutter.

Flutter version supported: 1.8.4

Get Started by creating your own implementation for CodeEditingValueHighlighterBase class.

[0.2.8] - 13th September 2019

  • Fix for paste toolbar not hiding on the initial cursor position

[0.2.8] - 6th September 2019

  • Fix for getSpanForPosition method implementation

[0.2.7] - 29th August 2019

  • Export CodeEditingValue in library

[0.2.6] - 28th August 2019

  • Fix for a possible null exception of remotelyEdited check

[0.2.5] - 25th August 2019

  • Fix for setEditingState not sent on value remotely edited

[0.2.4] - 23rd August 2019

  • Reduce calls to updateEditing value & TextInputConnection setEditingState

[0.2.3] - 21st August 2019

  • Fix for possible blank selection point

[0.2.2] - 14th August 2019

  • Minor fixes on paste

[0.2.1] - 13th August 2019

  • Allow pasting from the first cursor position
  • Move cursor to the end after paste

[0.2.0] - 13th August 2019

  • Re-created most of the underlying classes/widgets
  • 99% Naming changes

[0.1.32] - 7th August 2019

  • Reduce further calls to updateEditing value & TextInputConnection setEditingState

[0.1.31] - 7th August 2019

  • Reduce calls to TextInputConnection setEditingState

[0.1.22] - 7th August 2019

  • Some fixes for remote editing value update

[0.1.21] - 6th August 2019

  • Implement onChanged method

[0.1.2] - 6th August 2019

  • Remotely edited change reflection fix

[0.1.1] - 5th August 2019

  • Removed lower level dependencies on TextInputClient.
  • Fixed issue related to other TextFields getting unfunctional.

[0.1.0] - 2nd August 2019

  • Allow Changing Cursor Color

[0.0.3] - 1st August 2019

  • Support updating RichTextEditingValue remotely

[0.0.2] - 17th July 2019

  • Bump version to include demo gif.

[0.0.1] - 17th July 2019

  • Initial release: Working version of editor that uses a dummy parser.

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  rich_code_editor: ^0.2.9

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rich_code_editor/rich_code_editor.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
72
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
78
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Fix lib/code_editor/widgets/code_editable_text.dart. (-25.75 points)

Analysis of lib/code_editor/widgets/code_editable_text.dart failed with 1 error, 2 hints:

line 1388 col 11: Undefined name 'kMinInteractiveSize'.

line 39 col 11: The declaration '_kObscureShowLatestCharCursorTicks' isn't referenced.

line 1630 col 36: The value of the local variable 'controls' isn't used.

Fix lib/code_editor/widgets/code_text_field.dart. (-2.48 points)

Analysis of lib/code_editor/widgets/code_text_field.dart reported 5 hints:

line 545 col 3: This function has a return type of 'InputDecoration', but doesn't end with a return statement.

line 546 col 33: The value of the local variable 'localizations' isn't used.

line 880 col 3: The declaration '_toTextEditingValue' isn't referenced.

line 1018 col 9: 'onPointerEnter' is deprecated and shouldn't be used.

line 1019 col 9: 'onPointerExit' is deprecated and shouldn't be used.

Format lib/code_editor/code_highlighter.dart.

Run flutter format to format lib/code_editor/code_highlighter.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/code_editor/widgets/code_selection.dart (Run flutter format to format lib/code_editor/widgets/code_selection.dart.)
  • lib/code_editor/widgets/material_selection.dart (Run flutter format to format lib/code_editor/widgets/material_selection.dart.)
  • lib/rich_code_editor.dart (Run flutter format to format lib/rich_code_editor.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test