utills 2.0.2 copy "utills: ^2.0.2" to clipboard
utills: ^2.0.2 copied to clipboard

A comprehensive Flutter utility package providing layout gaps, form validators, a generic API handler, and a scroll-ready paginator.

2.0.2 #

✨ Added #

KeepAliveWrapper

  • Added KeepAliveWrapper for preserving widget state inside PageView, TabBarView, and IndexedStack children.

SlideInAnimation

  • Added SlideInAnimation with configurable duration, offset, direction, and curve for easy entrance animations.

🔧 Updated #

  • Exported src/keep_alive.dart and src/slide_animation.dart from lib/utills.dart.
  • Updated documentation and examples for the new widget helpers.
  • Added optional String? tag support to mapStatusCodeToFailure() for improved contextual logs and easier failure tracing.

2.0.1 #

✨ Updated #

CustomToast

  • Reworked toast display to use a Navigator overlay instead of ScaffoldMessenger snack bars.
  • Added animated toast presentation with fade, slide, and size transitions.
  • Added ToastPosition support for top and bottom placement.
  • Added close action, automatic removal, and stacked toast handling.
  • Updated initialization to use GlobalKey<NavigatorState> through CustomToast.init().
  • Updated public usage to CustomToast.show().

Navigator

  • Added NavDirection for directional slide transitions.
  • Updated Navigate.push() with optional direction and duration parameters.
  • Kept existing helpers for pushReplacement, pushAndRemoveUntil, and pop.

Documentation

  • Updated README examples for the new toast and navigation APIs.
  • Added a pub.dev example file so the Example tab can show package usage.

2.0.0 #

🚀 Initial Release #

Utills - A comprehensive Flutter utility package designed to accelerate development with battle-tested, reusable components.

✨ Features

1. Gaps (UI Spacing Utilities)

  • Pre-defined spacing constants for consistent UI layouts
  • Easy-to-use gap widgets for vertical and horizontal spacing
  • Follows Flutter Material Design spacing guidelines

2. Validators (Form Validation)

  • Email validation
  • Password validation with strength requirements
  • Phone number validation
  • Text field validators for common use cases
  • Custom validation messages for user feedback

3. API Handler & Failure Handling

  • Structured failure types using sealed classes
  • Type-safe API response handling
  • Built-in error mapping and categorization
  • Support for network, server, and client errors

4. Paginator

  • Efficient pagination management
  • Handles page offset and limit calculations
  • Supports infinite scroll patterns
  • Zero external dependencies

5. Log

  • Developer-friendly, colorized console output for debugging
  • Automatic no-op behavior in release builds for production safety
  • Structured log levels: success, error, info, warn, and trace
  • Direct support for object and data structure inspection
  • Streamlined replacement for standard print() or debugPrint()

6. CustomToast

  • Decoupled architecture requiring no BuildContext
  • Support for success, error, and warning states
  • Configurable global theme for colors, styling, and duration
  • Automatic management of multiple active toast messages
  • Clean, drop-in replacement for standard SnackBar implementation

7. Navigator

  • Simplified routing via push, pushReplacement, and pushAndRemoveUntil
  • Decoupled, context-aware navigation management
  • Generic support for typed route results
  • Elimination of MaterialPageRoute boilerplate code
  • Streamlined stack management for common app flows like Login/Logout

🎯 Key Benefits

  • ✅ Type-safe with null safety
  • ✅ Zero external dependencies (Flutter only)
  • ✅ Fully documented API
  • ✅ Lightweight and performant
  • ✅ Production-ready code

📝 Notes

  • Requires Flutter 3.0.0 or higher
  • Requires Dart SDK 3.10.0 or higher
  • Compatible with both Android, iOS, Web, and other Flutter platforms
0
likes
150
points
121
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter utility package providing layout gaps, form validators, a generic API handler, and a scroll-ready paginator.

Homepage
Repository (GitLab)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on utills