groovin_string_masks 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 19

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

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

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

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  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:


dependencies:
  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';
  
Version Uploaded Documentation Archive
1.0.0 Aug 16, 2018 Go to the documentation of groovin_string_masks 1.0.0 Download groovin_string_masks 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
10
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
19
Learn more about scoring.

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

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter packages pub upgrade failed with the following output:

ERR: The current Flutter SDK version is 1.5.8.
 
 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.

Dependencies

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