overwrite 1.0.0

overwrite #

Overwrite mode for textarea elements in Dart

To put a textarea element into overwrite mode:

    var overwrite = new OverwriteElement(element);

To set the element back to normal editing:

  overwrite.setInputMode(OverwriteMode.INSERT);

To subscribe to change made to the element value by typing, cutting, pasting, setting the value programmatically, or by whitespace being added:

  overwrite.onOverwriteEvent.listen((event) {
    // set text in model
  });

New text typed into the textarea will overwrite the existing content instead of inserting it.

Overwrite also handles deleting and backspacing single characters and selections, cut, and paste.

When the textarea receives focus, overwrite pads the value with spaces to fill the client width of the element.

Use this package as a library

1. Depend on it

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


dependencies:
  overwrite: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:overwrite/overwrite.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
37
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-native on android

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime flutter-native on ios

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime flutter-native on linux

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime flutter-native on macos

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime flutter-native on windows

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime native

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Package not compatible with runtime native-aot

Because:

  • package:overwrite/overwrite.dart that imports:
  • dart:html

Health suggestions

Fix lib/overwrite.dart. (-9.54 points)

Analysis of lib/overwrite.dart reported 20 hints, including:

line 1 col 1: Prefer using /// for doc comments.

line 8 col 1: Prefer using /// for doc comments.

line 27 col 24: Unnecessary new keyword.

line 29 col 48: Unnecessary new keyword.

line 76 col 9: Unnecessary new keyword.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-15 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and overwrite.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Documentation URL is insecure. (-5 points)

Update the documentation field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
logging ^0.11.2 0.11.4
Dev dependencies
test ^1.14.2