Zeba Academy Extensions

pub package License: GPL v3 Flutter Dart

A comprehensive collection of Flutter and Dart extensions that simplify everyday development.

zeba_academy_extensions provides a rich set of production-ready extension methods for strings, widgets, numbers, dates, collections, nullable values, colors, and more.


✨ Features

šŸ“ String Extensions

  • Capitalize first letter
  • Capitalize every word
  • Reverse string
  • Remove spaces
  • Repeat string
  • Email validation
  • Phone validation
  • URL validation
  • Numeric validation
  • Blank string detection

šŸ“… DateTime Extensions

  • Format dates
  • Check today
  • Check yesterday
  • Calculate age
  • Difference from now

ā± Duration Extensions

  • HH:mm:ss formatter

šŸ”¢ Number Extensions

  • Currency formatting
  • Decimal formatting
  • Compact formatting (1K, 1M)

šŸŽØ Widget Extensions

  • Padding
  • Center
  • Expanded
  • Flexible
  • SizedBox
  • Card wrapper

šŸ“± BuildContext Extensions

  • Theme
  • TextTheme
  • Screen width
  • Screen height
  • Screen size

šŸ“‹ Iterable Extensions

  • firstOrNull
  • lastOrNull

šŸ“š List Extensions

  • Separate items with custom separator

šŸŽÆ Boolean Extensions

  • Yes / No
  • Integer conversion

🌈 Color Extensions

  • Lighten color
  • Darken color

āœ… Validation Extensions

  • Strong password validation
  • OTP validation

šŸ›” Null Safety Extensions

  • isNullOrEmpty
  • orEmpty

Installation

Add the dependency to your pubspec.yaml.

dependencies:
  zeba_academy_extensions: ^1.0.0

Then install packages.

flutter pub get

Import

import 'package:zeba_academy_extensions/zeba_academy_extensions.dart';

Usage

String Extensions

print("hello".capitalize);
// Hello

print("hello world".capitalizeWords);
// Hello World

print("Flutter".reverse);
// rettulF

print("abc@gmail.com".isEmail);
// true

print("9876543210".isPhone);
// true

print("123".isNumeric);
// true

print("Hello World".removeSpaces);
// HelloWorld

DateTime Extensions

final now = DateTime.now();

print(now.format());

print(now.isToday);

print(now.differenceFromNow());

Number Extensions

print(250000.currency);

print(1234.decimal);

print(1200000.compact);

Widget Extensions

Text("Hello")
    .paddingAll(16)
    .center();

Container()
    .card();

Text("Flutter")
    .expanded();

BuildContext Extensions

context.width;

context.height;

context.theme;

context.textTheme;

Nullable Extensions

String? name;

print(name.isNullOrEmpty);

print(name.orEmpty);

Validation Extensions

print("Password123".isPasswordStrong);

print("123456".isOTP);

Color Extensions

Colors.blue.lighten();

Colors.red.darken();

Iterable Extensions

final numbers = [1, 2, 3];

numbers.firstOrNull;

numbers.lastOrNull;

Boolean Extensions

true.yesNo;

false.intValue;

Platform Support

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

Why Zeba Academy Extensions?

  • Lightweight
  • Zero unnecessary dependencies
  • Null-safe
  • Flutter-friendly
  • Easy to use
  • Production-ready
  • Clean API
  • Well documented
  • Tested
  • Cross-platform

Roadmap

  • More String utilities
  • Navigation helpers
  • Responsive extensions
  • Animation helpers
  • Theme extensions
  • File extensions
  • JSON extensions
  • Map utilities
  • Responsive helpers
  • Additional validation methods

Contributing

Contributions are welcome!

If you find a bug or have a feature request, please open an issue or submit a pull request.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push your branch
  5. Open 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, tech, and development at Zeba Academy.

Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience.

Level up your tech journey today!

Website

https://zeba.academy

Learning Portal

https://code.zeba.academy

YouTube

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

Instagram

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


Support

If you find this package useful, consider:

  • ⭐ Starring the repository
  • šŸ‘ Liking and sharing
  • šŸ› Reporting issues
  • šŸ’” Suggesting new features
  • šŸ¤ Contributing to development

Made with ā¤ļø by Zeba Academy