mask_shifter 0.1.0

  • Example
  • Installing
  • Versions
  • 86

mask_shifter #

This package provides a way to switch between two masks in a TextField

Getting Started #

Import the packages:

import 'package:flutter_masked_text/flutter_masked_text.dart';

Is very simple to use: #

Just pass the class as an input formatter. Example:

return TextField(
          inputFormatters: [
          decoration: InputDecoration(
            border: OutlineInputBorder(),
            labelText: this.label,
            labelStyle: TextStyle(fontWeight: FontWeight.bold),

There are two parameters, maskONE and maskTWO. maskONE must be the shorter mascara, and maskTWO the longest.

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.0.1] - 03/12/2018

  • Initial Release of Package


import 'package:flutter/material.dart';
import 'package:mask_shifter/mask_shifter.dart';

class UsersData extends StatefulWidget {
  UsersData({Key key}) : super(key: key);

  _UsersData createState() => _UsersData();

class _UsersData extends State<UsersData> {
  void initState() {
    // TODO: implement initState

  Widget build(BuildContext context) {
    return Scaffold(
      body: NestedScrollView(
        body: ListView(
          children: <Widget>[
              padding: const EdgeInsets.all(8.0),
              child: TextField(
                //HERE IS HOW USE THE LIBRARY
                inputFormatters: [
                      maskONE: "XXX.XXX.XXX-XX", maskTWO: "XX.XXX.XXX/XXXX-XX"),
                decoration: InputDecoration(
                  border: OutlineInputBorder(),
                  labelText: "CPF/CNPJ MASK",
                  labelStyle: TextStyle(fontWeight: FontWeight.bold),

Use this package as a library

1. Depend on it

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

  mask_shifter: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:mask_shifter/mask_shifter.dart';
Version Uploaded Documentation Archive
0.1.0 Dec 27, 2018 Go to the documentation of mask_shifter 0.1.0 Download mask_shifter 0.1.0 archive
0.0.1 Dec 4, 2018 Go to the documentation of mask_shifter 0.0.1 Download mask_shifter 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/mask_shifter.dart. (-1 points)

Analysis of lib/mask_shifter.dart reported 2 hints:

line 32 col 18: Name non-constant identifiers using lowerCamelCase.

line 55 col 18: Name non-constant identifiers using lowerCamelCase.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies