Advanced Text Controllers

A Flutter package that provides advanced text editing controllers for managing and formatting various types of inputs, including dates, times, models, and numerical values.

Features

  • DateEditingController: Manages and formats date input with customizable date and time patterns.
  • TimeEditingController: Handles time input with customizable formatting.
  • ModelEditingController: Supports binding and updating custom models with text input fields.
  • MultiValueEditingController: Manages a single string key value, useful for identifying multiple values.
  • IntegerEditingController: Parses and handles integer input.
  • DoubleEditingController: Parses and handles double input.

Installation

Add the following line to your pubspec.yaml under dependencies:

dependencies:
  advance_text_controller: latest_version

You can install packages from the command line:

flutter pub add advance_text_controller

Controllers Overview

DateEditingController

A controller for managing and formatting date input.

final dateController = DateEditingController(
  dateFormatPattern: 'dd MMM yyyy',
);

TimeEditingController

A controller for managing and formatting time input.

final timeController = TimeEditingController(
  timeFormatPattern: 'hh:mm a',
);

ModelEditingController

A controller for managing input based on a custom model.

final modelController = ModelEditingController<ProductModel>(
  getValue: (model) => model.name,
  setValue: (model, value) => model.copyWith(name: value),
);

IntegerEditingController

A controller for managing integer input.

final integerController = IntegerEditingController();

DoubleEditingController

A controller for managing double input.

final doubleController = DoubleEditingController();

Example

See Example page for example code.

Contributing

Feel free to open issues or submit pull requests on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Libraries

advance_text_controller
My new Flutter package