flutter_extend 0.0.6 copy "flutter_extend: ^0.0.6" to clipboard
flutter_extend: ^0.0.6 copied to clipboard

Simple, Efficient Flutter Extensions! Supercharge your Flutter development with a collection of easy-to-use, lightweight, and practical extension methods.

Flutter Extend #

FLUTTER EXTEND

A Flutter package designed to provide developers with a collection of useful extensions for Flutter and Dart. These extensions aim to simplify and speed up development by adding frequently used functionalities that are not available out-of-the-box.

Features #

  • πŸš€ Prebuilt Extension Methods: Simplify common Flutter development tasks with prebuilt extensions for widgets, colors, strings, and more.
  • 🎨 Custom MaterialColor Generator: Easily create dynamic MaterialColor palettes from any Color.
  • πŸ›  Convenient String Manipulations: Transform and format strings effortlessly.
  • πŸ“ Widget Utilities: Add padding, margins, and styling directly to widgets.

Getting started #

  1. Add this package to your pubspec.yaml file:
dependencies:
  flutter_extend: ^0.0.6
  1. Run the following command to get the package:
  flutter pub get
  1. Import the package in your Dart file:
import 'package:flutter_extend/flutter_extend.dart';

Usage #

Context Extensions #

Screen Width - context.screenWidth

/// Get Current Screen Width
Text("SCREEN WIDTH : ${context.screenWidth}")

Check Dark Mode - context.isDarkMode

/// Change color if is Dark Mode
Container(
width: 100,
height: 100,
color: context.isDarkMode ? Colors.grey : Colors.red,
),

Other handy Context Extension methods include:

context.screenWidth, context.screenHeight, context.isDarkMode, context.theme, context.colorScheme

Visit the context_extensions.dart example for the full API Reference.

String Extensions #

import 'package:flutter_extend/flutter_extend.dart';

void main() {
  String text = "hello world";
  print(text.capitalize()); // Output: Hello world
}

DateTime Extensions #

import 'package:flutter_extend/flutter_extend.dart';

void main() {
  DateTime now = DateTime.now();
  print(now.isToday()); // Output: true if today, false otherwise
}

Examples #

Check out the examples directory for complete examples demonstrating the use of this package:

git clone https://github.com/KenStarry/flutter_extend.git
cd flutter_extend/examples
flutter run

Contributing #

We welcome contributions! If you have ideas or improvements, feel free to:

  • Fork the repository.
  • Create a new branch for your feature/bug fix.
  • Submit a pull request.

Read the Contributing Guidelines for more details.

License #

This package is distributed under the MIT License. See the LICENSE file for more details.

See yah! FLUTTER EXTEND

12
likes
0
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

Simple, Efficient Flutter Extensions! Supercharge your Flutter development with a collection of easy-to-use, lightweight, and practical extension methods.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl

More

Packages that depend on flutter_extend