🧑💻 vuitv code base
A collection of utilities and formatters for Flutter applications, created by VuiTv 🤖
Setup
Add to your pubspec.yaml
:
dependencies:
vuitv: ^3.28.0
Features
Text Input Formatters
- Currency formatting (USD, VND)
- Phone number formatting (US and Vietnamese formats)
- Hex color input
- Text capitalization
- Number formatting
Examples
Currency Formatter
// US currency formatter ($)
final usFormatter = CountryCurrencyInputFormatter();
// Output: $1,234.56
// Vietnamese currency formatter (₫)
final vnFormatter = CountryCurrencyInputFormatter();
// Output: 1,234₫
Phone Number Formatter
// US format
final phoneNumber = CountryPhoneInputFormatter();
// Input: 1234567890
// Output: (123) 456-7890
// Vietnamese format
final vnPhone = CountryPhoneInputFormatter();
// Input: 0123456789
// Output: 0123 456 789
Hex Color Formatter
final hexColor = HexColorInputFormatter();
// Input: #FF0000
// Output: Color(0xFFFF0000)
Text Capitalization
// Capitalize words
final wordCaps = TextCapitalizationFormatter.words();
// Input: hello world
// Output: Hello World
// Capitalize sentences
final sentenceCaps = TextCapitalizationFormatter.sentences();
// Input: hello. world.
// Output: Hello. World.