Search packages, repositories and app categories

Package detailsv3.0.1

extended_masked_text

A small set of custom TextEditingControllers that allows masked text inputs for flutter apps

AndroidiOSmacOSWindowsLinux
30-day downloads
23.7K
Likes
147
Pub points
160

Install package

flutter pub add extended_masked_text

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

ExtendedMaskedText is a Flutter package providing custom TextEditingControllers for creating masked text inputs, enabling users to enter data like phone numbers, dates, or IDs with predefined formats. It supports real-time formatting and validation during input, improving user experience by ensuring correct structure as they type. The package is lightweight and integrates seamlessly into forms and input fields across multiple platforms.

Use cases

  • Form inputs with structured data
  • Phone number entry with formatting
  • Date and time input with masks
  • Credit card number formatting
  • Dynamic mask generation based on user input

Key features

  • Real-time input masking
  • Customizable mask patterns
  • Automatic cursor positioning
  • Support for dynamic masks
  • Built-in validation logic

Suitable for

  • Developers building form-heavy apps
  • Apps requiring strict input formatting
  • Cross-platform mobile and desktop applications
  • User interfaces emphasizing input accuracy

Considerations

  • May require careful mask pattern design
  • Limited to text input scenarios
  • Potential complexity with nested or variable masks
  • Not suitable for non-text input types
  • Requires manual handling of special characters in masks

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Extended Masked Text Logo

Extended Masked Text

This package is based on the source code of flutter_masked_text and is an attempt to fix some bugs and continue the development of the original one.

Usage

Import the library

import 'package:extended_masked_text/extended_masked_text.dart';

MaskedTextController

Create your mask controller:

final controller = MaskedTextController(mask: '000.000.000-00');

Set controller to your text field:

return MaterialApp(
    title: 'Masked Text Demo',
    theme: ThemeData(
        primarySwatch: Colors.blue,
    ),
    home: SafeArea(
        child: Scaffold(
            body: Column(
                children: <Widget>[
                    TextField(
                        // Add controller to TextField
                        controller: controller,
                    ),
                ],
            ),
        ),
    ),
);

MoneyMaskedTextController

Create your mask controller:

final controller = MoneyMaskedTextController(leftSymbol: 'R\$ ');

Set controller to your text field:

return MaterialApp(
    title: 'Money Masked Text Demo',
    theme: ThemeData(
        primarySwatch: Colors.blue,
    ),
    home: SafeArea(
        child: Scaffold(
            body: Column(
                children: <Widget>[
                    TextField(
                        // Add controller to TextField
                        controller: controller,
                    ),
                ],
            ),
        ),
    ),
);

Categories

Source repository

Projects using this package