overwrite 0.3.5

  • README.md
  • Installing
  • Versions
  • 36

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.

1. Depend on it

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


dependencies:
  overwrite: "^0.3.5"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support 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';
        
Version Uploaded Documentation Archive
0.3.5 Sep 16, 2016 Go to the documentation of overwrite 0.3.5 Download overwrite 0.3.5 archive
0.3.4 Jul 29, 2016 Go to the documentation of overwrite 0.3.4 Download overwrite 0.3.4 archive
0.3.3 Jul 29, 2016 failed Download overwrite 0.3.3 archive
0.3.2 Jul 25, 2016 failed Download overwrite 0.3.2 archive
0.3.1 Jul 18, 2016 failed Download overwrite 0.3.1 archive
0.3.0 May 23, 2016 failed Download overwrite 0.3.0 archive
0.2.11 Mar 4, 2016 failed Download overwrite 0.2.11 archive
0.2.10 Feb 24, 2016 failed Download overwrite 0.2.10 archive
0.2.9 Nov 6, 2015 Go to the documentation of overwrite 0.2.9 Download overwrite 0.2.9 archive
0.2.8 Sep 13, 2015 Go to the documentation of overwrite 0.2.8 Download overwrite 0.2.8 archive

All 17 versions...

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

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

Platforms

Detected platforms: web

Primary library: package:overwrite/overwrite.dart with components: html.

Suggestions

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use overwrite.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Strong-mode analysis of lib/overwrite.dart gave the following hint:

    line: 384 col: 13
    The value of the field '_value' isn't used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
logging ^0.11.2 0.11.3+1
logging_handlers ^0.8.0 0.8.0
Transitive dependencies
intl 0.15.6
path 1.5.1
Dev dependencies
browser >=0.9.0 <0.10.0
unittest >=0.9.0 <0.10.0