groovin_string_masks 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 17

groovin_string_masks #

A string formatter and validator based on masks. Forked from EmersonMoura's 'string_mask' package as it appears to be abandonded.

Getting Started with Flutter #

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

For help on editing package code, view the documentation.

[1.0.0] - 8/15/2018

  • Initial release - Updated the old package to current standards


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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
      home: MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {

  Widget build(BuildContext context) {
    var formatter = StringMask('+00 (00) 0000-0000');
    var result = formatter.apply('553122222222'); // +55 (31) 2222-2222

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Center(
        child: Text(result),

Use this package as a library

1. Depend on it

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

  groovin_string_masks: ^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:groovin_string_masks/groovin_string_masks.dart';
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 Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter pub upgrade failed with the following output:

ERR: The current Flutter SDK version is 1.9.1+hotfix.4.
 Because groovin_string_masks requires Flutter SDK version ^0.5.1, version solving failed.

Health suggestions

Format lib/groovin_string_masks.dart.

Run flutter format to format lib/groovin_string_masks.dart.

Format lib/src/mask_pattern.dart.

Run flutter format to format lib/src/mask_pattern.dart.

Format lib/src/string_mask_base.dart.

Run flutter format to format lib/src/string_mask_base.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Package is getting outdated. (-17.26 points)

The package was last published 61 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0