input_mask 0.0.3 icon indicating copy to clipboard operation
input_mask: ^0.0.3 copied to clipboard

Platformweb

A Dart interface for RobinHerbots InputMask

A Dart interface to use with Robin Herbot's InputMask: https://github.com/RobinHerbots/Inputmask

Not all options are added.
But you can send a PR to add it or open an issue and we figure it out.

Usage #

A simple usage example:

import 'package:input_mask/input_mask.dart';

class MyComponent {
  Mask mask;
  
  @ViewChild('inp') InputElement inputElement;
    
  OnInit() {
    // or you can get it like:
    // final inputElement = document.createElement('input'); 
    
    mask = new Mask(new MaskOptions(
        showMaskOnHover: false,
        alias: 'integer',
        rightAlign: false,
        oncomplete: allowInterop((dynamic a){
          String clean = mask.unmaskedvalue();
  
          print('Complete: $clean');
        }),
        onincomplete: allowInterop((dynamic a){
          print('Incomplete');
        }),
        oncleared: allowInterop((a){
          print('Cleared');
        })
    )).mask(inputElement);
  }
}
0
likes
110
pub points
13%
popularity

Publisher

unverified uploader

A Dart interface for RobinHerbots InputMask

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-2-Clause (LICENSE)

Dependencies

js

More

Packages that depend on input_mask