groovin_string_masks 1.0.0

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

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 packages get

Alternatively, your editor might support pub get or 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: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]
46
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
39
Learn more about scoring.

We analyzed this package on Sep 21, 2018, and provided a score, details, and suggestions below. Analysis was completed with status tool failures using:

  • Dart: 2.0.0
  • pana: 0.12.3
  • Flutter: 0.8.4

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Issues and suggestions

Fix platform conflicts.

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Fix dependencies in pubspec.yaml.

Running flutter packages pub upgrade failed with the following output:

ERR: The current Flutter SDK version is 0.8.4.
 
 Because groovin_string_masks requires Flutter SDK version ^0.5.1, version solving failed.

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.

Dependencies

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