ready_made_extensions 0.0.2 copy "ready_made_extensions: ^0.0.2" to clipboard
ready_made_extensions: ^0.0.2 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, widget spacing, and more!


🌟 Features #

  • Handy extensions for String, int, double, DateTime, and more.
  • Flutter-specific extensions for widgets (e.g., adding padding, margin, etc.).
  • Write less code and achieve more readability.
  • 100% null-safety.

πŸ“¦ Installation #

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

dependencies:
  ready_made_extensions: ^0.0.2
Or if you are testing locally:

yaml
Copy code
dependencies:
  ready_made_extensions:
    path: ../ready_made_extensions
Then run:

bash
Copy code
flutter pub get
⚑ 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.

isValidEmail() β†’ Checks if string is a valid email.

reverse() β†’ Reverses the string.

int
toCurrency() β†’ Converts int to formatted currency.

seconds / minutes β†’ Converts to Duration.

double
toPrecision(n) β†’ Rounds to n decimal places.

Widget
.paddingAll(value) β†’ Adds padding.

.marginAll(value) β†’ Adds margin.

.onTap(callback) β†’ Wraps widget with GestureDetector.

.center() β†’ Wraps in Center widget.

…and many more πŸš€

πŸ› οΈ Contributing
Contributions are welcome!
Feel free to open an issue or submit a pull request on GitHub.

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

❀️ Support
If you like this package, don’t forget to star the repo ⭐ on GitHub and share with others.
0
likes
0
points
11
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ready_made_extensions