input_mask 0.0.3 copy "input_mask: ^0.0.3" to clipboard
input_mask: ^0.0.3 copied to clipboard

Platformweb

A Dart interface for RobinHerbots InputMask

example/input_mask_example.dart

import 'dart:html';
import 'dart:js';

import 'package:input_mask/input_mask.dart';

void main() {
  late InputMask mask;

  final inputElement = document.createElement('input');
  // or you can get it like:
  // @ViewChild('inp') InputElement inputElement;

  mask = InputMask(Options(
      showMaskOnHover: false,
      alias: 'integer',
      rightAlign: false,
      oncomplete: allowInterop((dynamic a) {
        final clean = mask.unmaskedvalue();

        print('Complete: $clean');
      }),
      onincomplete: allowInterop((dynamic a) {
        print('Incomplete');
      }),
      oncleared: allowInterop((a){
        print('Cleared');
      })
  )).mask(inputElement);
}
0
likes
100
pub points
4%
popularity

Publisher

unverified uploader

A Dart interface for RobinHerbots InputMask

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

js

More

Packages that depend on input_mask