text_formatters 0.0.1 copy "text_formatters: ^0.0.1" to clipboard
text_formatters: ^0.0.1 copied to clipboard

outdated

A package of pre-build `TextInputFormatter` objects to use with Flutter's `TextField` or `TextFormField` widgets.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Text Formatters Demo',
      home: new MyHomePage(),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Text Formatters Example'),
      ),
      body: new Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          new TextField(
            decoration: InputDecoration(
              labelText: "(no formatter)",
            ),
          ),
          new TextField(
            decoration: InputDecoration(
              labelText: "UppercaseInputFormatter",
            ),
            inputFormatters: [
              UppercaseInputFormatter(),
            ],
          ),
          new TextField(
            decoration: InputDecoration(
              labelText: "LowercaseInputFormatter",
            ),
            inputFormatters: [
              LowercaseInputFormatter(),
            ],
          ),
          new TextField(
            decoration: InputDecoration(
              labelText: "AlternatingCapsInputFormatter",
            ),
            inputFormatters: [
              AlternatingCapsInputFormatter(),
            ],
          ),
        ],
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A package of pre-build `TextInputFormatter` objects to use with Flutter's `TextField` or `TextFormField` widgets.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, groovin_string_masks

More

Packages that depend on text_formatters