zeba_academy_formatter 1.0.0 copy "zeba_academy_formatter: ^1.0.0" to clipboard
zeba_academy_formatter: ^1.0.0 copied to clipboard

A lightweight Flutter package for currency, date, number, phone, and localization formatting.

zeba_academy_formatter #

pub package License: GPL v3 Flutter Dart

A lightweight, fast, and developer-friendly Flutter formatting package that provides utilities for formatting currencies, dates, numbers, phone numbers, and localized values with a simple API.


✨ Features #

  • πŸ’° Currency formatting
  • πŸ“… Date formatting with custom patterns
  • πŸ”’ Number shortening (1K, 1M, 1B)
  • πŸ“± Phone number formatting
  • 🌍 Localization support
  • ⚑ Fast and lightweight
  • βœ… Null-safe
  • 🎯 Easy-to-use API
  • ❀️ Production ready

Installation #

Add the dependency to your pubspec.yaml.

dependencies:
  zeba_academy_formatter: ^1.0.0

Then run:

flutter pub get

Import #

import 'package:zeba_academy_formatter/zeba_academy_formatter.dart';

Currency Formatting #

CurrencyFormatter.format(
  12500.75,
  symbol: 'β‚Ή',
);

Output

β‚Ή12,500.75

Date Formatting #

DateFormatter.format(
  DateTime.now(),
  pattern: 'dd MMM yyyy',
);

Output

03 Jul 2026

Number Formatting #

NumberFormatter.compact(1200);

NumberFormatter.compact(2500000);

NumberFormatter.compact(7500000000);

Output

1.2K

2.5M

7.5B

Phone Number Formatting #

Indian

PhoneFormatter.indian("9876543210");

Output

98765 43210

US

PhoneFormatter.us("1234567890");

Output

(123) 456-7890

Localization #

Currency

LocalizationFormatter.currency(
  5000,
  "en_US",
);

Decimal

LocalizationFormatter.decimal(
  123456789,
  "de_DE",
);

Example #

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Formatter Demo'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(20),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                CurrencyFormatter.format(
                  25000,
                  symbol: 'β‚Ή',
                ),
              ),
              Text(
                DateFormatter.format(
                  DateTime.now(),
                  pattern: 'dd MMM yyyy',
                ),
              ),
              Text(
                NumberFormatter.compact(1500000),
              ),
              Text(
                PhoneFormatter.indian(
                  '9876543210',
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

API Overview #

Class Description
CurrencyFormatter Formats currency values
DateFormatter Formats dates using custom patterns
NumberFormatter Converts numbers to compact notation
PhoneFormatter Formats Indian and US phone numbers
LocalizationFormatter Localized currency and decimal formatting

Platform Support #

Platform Supported
Android βœ…
iOS βœ…
Web βœ…
Windows βœ…
macOS βœ…
Linux βœ…

Roadmap #

Version 1.1 #

  • Relative time formatting
  • Percentage formatting
  • File size formatting
  • Credit card formatter
  • Scientific notation
  • Ordinal formatter

Version 1.2 #

  • Input formatters
  • Time formatter
  • Duration formatter
  • Currency parser
  • Date parser
  • Time zone formatter

Version 2.0 #

  • 100+ locale support
  • Extension methods
  • Advanced masking
  • High-performance formatter engine
  • Complete unit test coverage

Contributing #

Contributions, issues, and feature requests are welcome.

If you would like to improve this package, feel free to fork the repository and submit a pull request.


License #

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

See the LICENSE file for details.


About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at https://sufyanism.com/ or connect with me on LinkedIn:

https://www.linkedin.com/in/sufyanism


Your all-in-one learning hub! #

πŸš€ Explore courses and resources in coding, technology, and development at Zeba Academy.

Learn through practical tutorials, real-world projects, and hands-on experience.

🌐 Websites #

Main Website

https://zeba.academy

Learning Portal

https://code.zeba.academy

πŸ“Ί YouTube #

https://www.youtube.com/@zeba.academy

πŸ“Έ Instagram #

https://www.instagram.com/zeba.academy/


Thank You #

Thank you for using zeba_academy_formatter.

If you like this package, don't forget to ⭐ the repository and share it with the Flutter community.

Happy Coding! πŸš€

0
likes
140
points
12
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A lightweight Flutter package for currency, date, number, phone, and localization formatting.

Homepage

Topics

#formatter #currency #date #localization #utilities

License

GPL-3.0 (license)

Dependencies

flutter, intl

More

Packages that depend on zeba_academy_formatter