ready_made_extensions 0.0.4 copy "ready_made_extensions: ^0.0.4" to clipboard
ready_made_extensions: ^0.0.4 copied to clipboard

A collection of ready-made Dart & Flutter extensions to simplify code, improve readability, and boost reusability.

ready_made_extensions πŸš€ #

A Flutter/Dart package that provides ready-made extensions to make your code cleaner, shorter, and easier to read.
With ready_made_extensions, you can simplify common tasks like string manipulation, list operations, DateTime formatting, widget spacing, and more!


🌟 Features #

  • Extensions for String, List, DateTime, BuildContext, and Widgets.
  • Reduce boilerplate code in your Flutter apps.
  • Boost readability and maintainability.
  • Fully supports null-safety.

πŸ“¦ Installation #

Add this to your package’s pubspec.yaml file:

dependencies:
  ready_made_extensions: ^0.0.4
Then run:

bash
Copy code
flutter pub get
If you are testing locally:

yaml
Copy code
dependencies:
  ready_made_extensions:
    path: ../ready_made_extensions
⚑ Usage
Import the package:

dart
Copy code
import 'package:ready_made_extensions/ready_made_extensions.dart';
Example
dart
Copy code
import 'package:flutter/material.dart';
import 'package:ready_made_extensions/ready_made_extensions.dart';

class TestScreen extends StatelessWidget {
  const TestScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: "hello world"
            .capitalize // from ready_made_extensions
            .text()     // converts to Text widget
            .paddingAll(16), // adds padding
      ),
    );
  }
}
πŸ“š Available Extensions
πŸ”Ή String
capitalize β†’ Capitalizes first letter.

isEmail β†’ Checks if string is a valid email.

isPhone β†’ Checks if string is a valid phone number.

reversed β†’ Reverses the string.

camelCase β†’ Converts to camelCase.

snakeCase β†’ Converts to snake_case.

πŸ”Ή List
unique() β†’ Removes duplicates.

chunked(size) β†’ Splits list into chunks.

sum β†’ Calculates sum of numbers.

average β†’ Finds average of numbers.

πŸ”Ή DateTime
timeAgo β†’ Formats as β€œ5m ago”, β€œ2h ago”, etc.

startOfDay / endOfDay

isToday

πŸ”Ή BuildContext
screenHeight / screenWidth

isDarkMode

textTheme / colors

πŸ”Ή Widget
.paddingAll(value)

.paddingSym(h: x, v: y)

.center

.expanded

.onTap(callback)

…and many more πŸš€

πŸ› οΈ Contributing
Contributions are welcome!

Open an issue

Submit a pull request

Suggest new extensions

πŸ“„ License
This project is licensed under the MIT License.

❀️ Support
If you like this package, don’t forget to:

⭐ Star the repo on GitHub

Share with your friends & Flutter devs!
0
likes
125
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A collection of ready-made Dart & Flutter extensions to simplify code, improve readability, and boost reusability.

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ready_made_extensions