đ EaseX - Simplify Flutter Development đī¸
EaseX is a feature-rich Flutter package that enhances development by providing a collection of powerful extensions and utilities. It simplifies UI styling, navigation, validation, device information handling, and much more. â¨

đ¯ Features
â
Text Styling Extensions đī¸ - Easily apply bold, italic, underlined, colored, and size styles to Text widgets.
â
Navigation Simplifications đ§ - Use .push() and .pop() to navigate between screens effortlessly.
â Device Utilities đą - Get device information like screen size, platform type (Android/iOS), and keyboard visibility.
â Enhanced Validation Helpers â - Built-in validators for email, phone, password, credit card, URL, age, username, postal codes, and more with advanced options.
â
Toast Notifications đ - Display toast messages easily using showToast(), showSuccessToast(), etc.
â
Spacing & Padding Extensions đ - Use .vBox and .pad() to manage spacing between widgets.
â
Keyboard Management â¨ī¸ - Hide the keyboard programmatically with EaseXDevice.hideKeyboard().
â
Rotation & Visibility đ - Rotate widgets with .rotate() and conditionally show them with .showIf().
â
Asynchronous Handling âŗ - Delay actions using Future.delayed(1.seconds) instead of manually defining durations.
â
Loading Indicator đ - Show and hide a global loader using EaseXLoader.show() and EaseXLoader.hide().
â
Expandable Widgets đ - Wrap widgets in .expanded() for better layout management.
â Smooth Alert Dialog Animation đ - Animated alert dialogs with bounce effects!
â Sharing Made Easy with EaseXShare Utils đ - Share text, images, videos, pdf and etc... files easily using EaseXShare Utils.
â EaseXMedia - Powerful media picking utilities
â EaseXStorage - Simple key-value storage
â
đŦ Animation Extensions - Add beautiful animations to widgets with .fadeIn(), .slideIn(), .bounce(), .shake(), and more!
â đ¨ Color Utilities - Comprehensive color manipulation tools including hex conversion, color blending, material palette generation, and social media brand colors.
â đž Cache Utilities - Smart caching system with TTL support, file caching, and cache management.
â đ Permission Utilities - Easy permission handling for camera, storage, location, contacts, and more with user-friendly dialogs.
đ New Features in v2.0.0
đŦ Animation Extensions
// Fade in animation
Text('Hello').fadeIn(duration: 300.ms)
// Slide animations
Container().slideInFromBottom()
Container().slideInFromTop()
Container().slideInFromLeft()
Container().slideInFromRight()
// Scale and rotation
Icon(Icons.star).scaleIn()
Image.asset('logo.png').rotateIn()
// Special effects
Button('Click me').bounce()
Text('Error').shake()
đ¨ Color Utilities
// Color conversion
Color color = EaseXColors.fromHex('#FF5722');
String hex = EaseXColors.toHex(Colors.blue);
// Color manipulation
Color darker = Colors.blue.darken(0.2);
Color lighter = Colors.red.lighten(0.3);
// Random colors
Color randomColor = EaseXColors.random();
Color pastelColor = EaseXColors.randomPastel();
// Material palette
Map<String, Color> palette = EaseXColors.generateMaterialPalette(Colors.purple);
// Social media colors
Container(color: EaseXColors.facebook)
Container(color: EaseXColors.twitter)
đž Cache Utilities
// Initialize cache
await EaseXCache.init();
// Cache data with TTL
await EaseXCache.cacheData('user_token', 'abc123', ttl: 1.hours);
// Get cached data
String? token = EaseXCache.getCachedData<String>('user_token');
// Cache files
await EaseXCache.cacheFile('profile_image', imageFile);
String? cachedPath = EaseXCache.getCachedFilePath('profile_image');
// Cache management
await EaseXCache.clearExpiredCache();
int size = await EaseXCache.getCacheSize();
đ Permission Utilities
// Request single permission
bool hasCamera = await EaseXPermissions.requestCameraPermission();
// Request with rationale dialog
bool hasLocation = await EaseXPermissions.handlePermissionRequest(
context,
Permission.location,
title: 'Location Needed',
rationaleMessage: 'We need location to show nearby places',
);
// Check permission status
bool isGranted = await EaseXPermissions.isPermissionGranted(Permission.camera);
// Request multiple permissions
final results = await EaseXPermissions.requestMultiplePermissions([
Permission.camera,
Permission.microphone,
Permission.storage,
]);
đ Previous Features in v1.6.x
â EaseFileSaver - Save Dynamic Files in iOS and Android
â Shimmer Effect on Widgets â Easily apply a shimmer effect to any widget using .shimmer()
And much more! đ Explore the complete package to discover all utilities. đĻ
đ Getting Started
đĨ Install the package
flutter pub add ease_x
đ Import it into your project
import 'package:ease_x/ease_x.dart';
đ§ Setup Instructions (Important!)
â ī¸ Permission Utilities Setup (Only if you use them)
Good news: If you don't use the permission utilities (EaseXPermissions), you don't need to do any additional setup! The package works out of the box for all other features.
If you use permission utilities, you need to add platform-specific configurations:
iOS Setup - ios/Runner/Info.plist
Add these usage descriptions based on which permissions you need:
<key>NSCameraUsageDescription</key>
<string>This app needs camera access to take photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs photos access to select images</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs location access to show nearby places</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access for recording</string>
<key>NSContactsUsageDescription</key>
<string>This app needs contacts access to find friends</string>
Android Setup - android/app/src/main/AndroidManifest.xml
Add required permissions based on your needs:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
Note: Only add the permissions you actually use in your app!
⥠Usage
đ¨ Text Styling Extensions
Text('Bold Text').bold(); // đ Make text bold
Text('Colored Text').colored(Colors.deepPurple); // đ¨ Apply color to text
Text('Sized Text').size(20); // đĄ Change text size
Text('Underlined Text').underlined(); // âī¸ Underline text
đ§ Navigation Simplification
context.push(SecondScreen()); // đ Navigate to another screen
context.pop(); // đ Go back to the previous screen
đą Device Utilities
bool hasInternet = await EaseXDevice.hasInternetConnection(); // đ Check internet connection
double screenWidth = EaseXDevice.getScreenWidth(context); // đ Get screen width
đ¨ Light and Dark Theme
MaterialApp(
debugShowCheckedModeBanner: false,
theme: EaseXTheme.light, // đ Light Theme
darkTheme: EaseXTheme.dark, // đ Dark Theme
navigatorKey: EaseXLoader.navigatorKey, // đ Required for EaseXLoader
home: const ExampleHomeScreen(), // đ Initial Screen
);
đ Toast Messages
"Hello from EaseX!".showBlackToast(); // đĸ Show black toast
"Success!".showSuccessToast(); // â
Show success toast
âŗ Show/Hide Loader
EaseXLoader.show(); // đ Show loading indicator
await Future.delayed(2.seconds);
EaseXLoader.hide(); // â Hide loader
đ Animated Alert Dialogs**
EaseXLoader.showAlert("This is an info alert!"); // âšī¸ Show an info alert
EaseXLoader.showErrorAlert("Oops! Something went wrong."); // â Show an error alert
EaseXLoader.showSuccessAlert(); // â
Show a success alert
đ Share Utils
EaseXShare.shareSingleImage(imageFile, text: "Sample Text");
EaseXShare.shareFile(file);
EaseXShare.openWhatsAppChat('+91', '8920119443',message: "Flutter Developer.");
đī¸ Conditional Visibility
Text('Visible Text').showIf(condition == true); // đ Show text based on condition
đŧī¸ Media Utilities
// Pick single image
final image = await EaseXMedia.pickImage();
// Pick video
final video = await EaseXMedia.pickVideo();
đž EaseX Storage
// Initialize (call once)
await EaseXStorage.init();
// Save data
await EaseXStorage.setString('token', 'abc123');
// Read data
final token = EaseXStorage.getString('token');
// Remove data
// await EaseXStorage.remove('token');
đ New Features in v1.5.0
đž EaseX File Saver
await EaseXFileSaver.saveFile(
fileName: 'note',
type: FileType.text,
content:
'EaseX is an Utility package for helping Flutter Developers.',
);
⨠Shimmer Effect
Container(
width: 200,
height: 120,
decoration:
BoxDecoration(borderRadius: BorderRadius.circular(12.0)),
).shimmer().pad(all: 12.0)
đŦ Animation Extensions
// Fade in with delay
Text('Animated Text').fadeIn(
duration: 500.ms,
delay: 200.ms,
);
// Slide from different directions
Container().slideInFromBottom(offset: 50.0);
Icon(Icons.star).slideInFromLeft();
// Scale and bounce effects
Image.network('url').scaleIn(beginScale: 0.5);
Button('Click me').bounce();
// Shake effect for errors
Text('Invalid input').shake();
đ¨ Color Utilities
// Convert between formats
Color fromHex = EaseXColors.fromHex('#FF5722');
String toHex = Colors.blue.toHex();
// Color manipulation
Color darker = Colors.blue.darken(0.2);
Color lighter = Colors.red.lighten(0.3);
Color complementary = Colors.green.complementary;
// Generate colors
Color random = EaseXColors.random(bright: true);
Color pastel = EaseXColors.randomPastel();
// Material design palette
final palette = EaseXColors.generateMaterialPalette(Colors.purple);
final purple50 = palette['50'];
final purple900 = palette['900'];
// Social media brand colors
Container(color: EaseXColors.facebook)
Container(color: EaseXColors.instagram)
Container(color: EaseXColors.twitter)
đž Cache Utilities
// Initialize cache system
await EaseXCache.init();
// Cache data with TTL
await EaseXCache.cacheData('api_response', responseData, ttl: 30.minutes);
await EaseXCache.cacheList('user_list', users, ttl: 1.hours);
// Retrieve cached data
final response = EaseXCache.getCachedData<Map<String, dynamic>>('api_response');
final users = EaseXCache.getCachedList<User>('user_list');
// File caching
await EaseXCache.cacheImageFromUrl('https://example.com/image.jpg', 'profile_image');
final cachedImage = EaseXCache.getCachedImage('profile_image');
// Cache management
await EaseXCache.clearExpiredCache();
await EaseXCache.clearAllCache();
// Cache statistics
final stats = await EaseXCache.getCacheStats();
print('Cache size: ${stats['cacheSize']}');
print('Valid entries: ${stats['validEntries']}');
đ Permission Utilities
// Request individual permissions
bool cameraGranted = await EaseXPermissions.requestCameraPermission();
bool locationGranted = await EaseXPermissions.requestLocationPermission();
bool storageGranted = await EaseXPermissions.requestStoragePermission();
// Request with user-friendly dialogs
bool granted = await EaseXPermissions.handlePermissionRequest(
context,
Permission.camera,
title: 'Camera Permission Required',
rationaleMessage: 'We need camera access to take photos',
deniedMessage: 'Camera permission was denied',
permanentlyDeniedMessage: 'Please enable camera in settings',
);
// Check permission status
bool isGranted = await EaseXPermissions.isPermissionGranted(Permission.camera);
bool isDenied = await EaseXPermissions.isPermissionDenied(Permission.camera);
bool isPermanentlyDenied = await EaseXPermissions.isPermissionPermanentlyDenied(Permission.camera);
// Request multiple permissions
final results = await EaseXPermissions.requestMultiplePermissions([
Permission.camera,
Permission.microphone,
Permission.location,
]);
// Get all permissions status
final statusMap = await EaseXPermissions.getAllPermissionsStatus();
// Handle missing permissions
final required = [Permission.camera, Permission.storage];
final missing = await EaseXPermissions.getMissingPermissions(required);
if (missing.isNotEmpty) {
await EaseXPermissions.requestMissingPermissions(required);
}
đ§ Enhanced Form Validation
Basic Validation
// Required field validation
String? error = EaseXValidator.validateEmptyText('Name', value);
// Email validation
String? emailError = EaseXValidator.validateEmail('user@example.com');
// Enhanced password validation
String? passwordError = EaseXValidator.validatePassword(
'P@ssw0rd123',
minLength: 8,
requireUppercase: true,
requireLowercase: true,
requireNumbers: true,
requireSpecialChars: true,
);
// Phone number validation (country-specific)
String? phoneError = EaseXValidator.validatePhoneNumber(
'+1234567890',
countryCode: 'US',
allowInternational: true,
);
Advanced Validation
// URL validation
String? urlError = EaseXValidator.validateURL('https://example.com');
// Credit card validation with Luhn algorithm
String? cardError = EaseXValidator.validateCreditCard('4111 1111 1111 1111');
// Expiry date validation
String? expiryError = EaseXValidator.validateExpiryDate('12/25');
// CVV validation
String? cvvError = EaseXValidator.validateCVV('123');
// Age validation
String? ageError = EaseXValidator.validateAge(25, min: 18, max: 100);
// Username validation
String? usernameError = EaseXValidator.validateUsername(
'john_doe123',
minLength: 3,
maxLength: 20,
);
// Name validation
String? nameError = EaseXValidator.validateName('John Doe', fieldName: 'First Name');
// Postal code validation (country-specific)
String? postalError = EaseXValidator.validatePostalCode(
'SW1A 1AA',
countryCode: 'UK',
);
// Number validation with range
String? numberError = EaseXValidator.validateNumber(
'42',
min: 1,
max: 100,
allowDecimals: false,
);
đ Future Roadmap (Coming Soon)
Enhanced Device Information
- Device ID and unique identifiers
- App version information
- Battery level monitoring
- Device memory and storage info
- Network connectivity details
- Screen density and DPI information
File System Utilities
- File size calculation and formatting
- Directory size analysis
- Cache cleanup automation
- File type detection
- Secure file operations
Localization Support
- Currency formatting for different locales
- Number and date localization
- Text direction (RTL/LTR) support
- Locale-aware validation
- Multi-language error messages
Security Utilities
- Password hashing and encryption
- Secure token generation
- Biometric authentication helpers
- Data obfuscation utilities
- Security best practices helpers
âšī¸ Additional Information
EaseX is designed to make Flutter development easier and faster by reducing boilerplate code and providing comprehensive utilities for common development tasks. đ
The package now includes animation extensions, color utilities, enhanced validation, caching system, and permission management to handle all your development needs in one place.
There is so much more to explore! Check out the package code for a deep dive into all available features.
Happy coding! đđĨ
đ¨âđģ Contributors
This package is actively maintained by:
|
Shashwat |
Ajay |
đŦ Feel free to connect with us on LinkedIn! đ
Let me know if you need any modifications! đđĨ
Libraries
- ease_x
- extensions/ease_x_animation_ext
- extensions/ease_x_ui_ext
- extensions/ease_x_variables_ext
- time/ease_x_time_ago
- time/ease_x_time_builder
- utils/ease_x_cache
- utils/ease_x_colors
- utils/ease_x_device
- utils/ease_x_file_saver
- utils/ease_x_loader
- utils/ease_x_media
- utils/ease_x_permissions
- utils/ease_x_storage
- utils/ease_x_theme
- utils/ease_x_validator
- utils/size