dev_utils 0.0.3 copy "dev_utils: ^0.0.3" to clipboard
dev_utils: ^0.0.3 copied to clipboard

Utils to make developement faster.

πŸŽ‰ Flutter Utils πŸš€ #

Welcome to Flutter Utils, your new best friend for Flutter development! 🎨

This utility package brings convenience, efficiency, and simplicity to your Flutter apps. With a wide variety of extensions, validators, and utilities, we’ve made it easier to build beautiful, responsive, and maintainable Flutter apps with less boilerplate code! πŸ§‘β€πŸ’»βœ¨

Features 🌟 #

πŸ› οΈ Extensions for BuildContext #

Say goodbye to repetitive code! Our extensions on BuildContext give you instant access to useful properties like:

  • πŸ“± MediaQuery – Screen size, orientation, and device pixel ratio.
  • 🎨 ThemeData – Colors, typography, and more.
  • πŸ’» Breakpoints – Responsive layout detection (isMobile, isTablet, isDesktop).
  • πŸš€ Navigation – Push and pop routes easily.

🧩 Widget Padding Extensions #

Add padding to any widget effortlessly:

  • Uniform padding with pad().
  • Symmetric padding with paddingSymmetric().
  • Custom padding for top, bottom, left, right with customPadding().

πŸ“ Validators #

No more manual validation! πŸ”₯ Validate:

  • πŸ“§ Emails – Check for valid email addresses.
  • πŸ”‘ Passwords – Ensure passwords are strong enough.
  • πŸ“± Phone Numbers – Validate phone number formats.
  • πŸ† And many more! Quickly add these checks to your forms.

🌱 Additional Utilities #

  • Adaptive Padding: Adjust padding based on the screen width πŸ“.
  • Dynamic Font Scaling: Make text responsive to screen size! πŸ”€.
  • Safe Area Helpers: Easy access to safe area padding & view insets πŸ“±.

πŸš€ How It Helps Developers #

πŸ’ͺ Less Boilerplate #

Stop repeating yourself! Flutter Utils simplifies common tasks with clean and easy-to-use extensions, saving you time and effort. πŸ•’

πŸ“± Responsive Design Made Easy #

Detect screen sizes and orientations with ease. Whether you’re building for mobile, tablet, or desktop, Flutter Utils has you covered. πŸ–₯οΈπŸ“±

πŸ”’ Validate User Input Like a Pro #

Forget writing manual validation logic. With just a call, you can validate email, phone numbers, and passwords. Let Flutter Utils handle the validation while you focus on building cool features. πŸ”

🎨 Theming and Styling at Your Fingertips #

Quickly access theme properties, text styles, and colors without digging into Theme.of(context). Just use the simple extensions to make your UI consistent and stylish! πŸ’…

πŸ“¦ Installation #

Add the package to your pubspec.yaml:

dependencies:
  flutter_utils: latest_version

Run flutter pub get to install πŸš€.

🏁 Usage #

πŸ› οΈ Context Extensions #

Access media queries, themes, and breakpoints with ease:

import 'package:flutter_utils/flutter_utils.dart';

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: context.primaryColor, // 🎨 Access theme colors!
      width: context.width * 0.8,  // πŸ“ Use 80% of screen width
      height: context.height * 0.5,
      child: Text(
        'Hello, Flutter!',
        style: context.textTheme.headlineMedium, // πŸ–‹οΈ Apply text styles
      ),
    );
  }
}

🧩 Widget Padding Extensions #

Add padding in a breeze:

import 'package:flutter_utils/flutter_utils.dart';

Text('Padded Text').uniformPadding(16); // πŸ’ͺ Add uniform padding of 16
Text('Custom Padding').customPadding(left: 10, top: 5); // 🎯 Add custom padding

πŸ“ Validators #

Validate common input fields:

import 'package:flutter_utils/flutter_utils.dart';

String email = 'test@example.com';
if (!email.isValidEmail()) {
  print('Invalid email address! πŸ“§');
}

String password = 'P@ssw0rd';
if (!password.isStrongPassword()) {
  print('Weak password! πŸ”‘');
}

🌱 Breakpoints #

Create responsive layouts based on screen size:

import 'package:flutter_utils/flutter_utils.dart';

if (context.isMobile) {
  print('Mobile layout detected! πŸ“±');
} else if (context.isTablet) {
  print('Tablet layout detected! πŸ’»');
}

πŸ“š Documentation #

Check out the API docs for a complete list of available extensions and methods. With Flutter Utils, you have everything you need to streamline your development process and create beautiful, responsive apps faster than ever! πŸš€

🀝 Contributing #

We welcome contributions! Feel free to fork the repo, create a pull request, or report any issues you find. Let’s make this package even better, together! 🌍

πŸ§‘β€πŸ’» License #

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


Let me know if you'd like to add any other specific sections or features, and I can enhance the README further!

4
likes
130
points
149
downloads

Publisher

verified publishershashiben.me

Weekly Downloads

Utils to make developement faster.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dev_utils