Package selection guidance compiled from public package information, community data, and project usage.
Fittor is a Flutter package designed to simplify responsive user interfaces and state management. It automatically adapts layouts to different screen sizes and orientations, ensuring consistent UI across devices. By leveraging built-in responsive utilities, Fittor reduces boilerplate code and streamlines development for multi-platform apps. Ideal for developers seeking efficient, scalable solutions without complex configuration. The package supports all major platforms, including mobile, web, and desktop, making it versatile for modern app development.
Use cases
Building responsive layouts for multi-device apps
Simplifying state management in Flutter projects
Creating adaptive UIs for varying screen sizes
Developing cross-platform applications with consistent design
Automating layout adjustments based on orientation
Reducing manual media query handling
Key features
Automatic responsiveness across screen sizes
Built-in state management utilities
Support for all Flutter platforms
Orientation-aware layout adaptation
Minimal boilerplate code
Easy integration via pub add
Suitable for
Flutter developers targeting multiple platforms
Teams prioritizing responsive UI design
Projects requiring minimal setup for adaptive layouts
Developers seeking lightweight state management
Apps needing consistent UX across devices
Rapid prototyping with responsive components
Considerations
May require learning new responsive patterns
Limited customization compared to full custom solutions
Depends on Flutter's rendering pipeline
Not ideal for highly complex state flows
Best suited for moderate to large-scale responsive apps
Requires understanding of Flutter's widget tree
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
A comprehensive Flutter package for responsive UI design and network connectivity management.
A lightweight, intuitive state management solution for Flutter applications.
// Width SizedBox20.w // SizedBox with width 20// Height SizedBox16.h // SizedBox with height 16// Square SizedBox24.s // SizedBox with width and height both 24
Internet Connectivity
Fittor includes built-in internet connectivity monitoring without any external packages.
When ignoreOfflineState is set to true, the ConnectivityWrapper will not automatically show the no-internet screen when connectivity is lost. Instead, it will continue showing your child widget and notify you of connectivity changes through the onConnectivityChanged callback. This is useful when you want to handle connectivity UI yourself, such as showing snackbars or banners instead of full-screen notifications.
Using ConnectivityMixin
For more fine-grained control, use the ConnectivityMixin in your StatefulWidget:
// Convert and format with currency symbolString formattedAmount = await context.convertAndFormat(
from: 'INR',
to: 'USD',
amount: 100.0,
);
print('100 INR = $formattedAmount'); // Outputs: 100 INR = $1.17
Format with Custom Symbols
// Format a currency amount with proper symbolString formatted = context.formatCurrency(1234.56, 'USD');
print(formatted); // Outputs: $1,234.56
Live Exchange Rates
// Get the current exchange rate between two currenciesdouble rate = await context.getExchangeRate('INR', 'USD');
print('1 INR = $rate USD');
Advanced Usage
Direct Access to CurrencyConverter
final converter = CurrencyConverter();
// Manually get latest rates for a base currencyMap<String, dynamic> rates = await converter.getLatestRates('EUR');
// Check cache statusMap<String, dynamic> cacheInfo = converter.getCacheInfo();
print('Last updated: ${cacheInfo['lastUpdated']}');
FittorCurrency Utilities
final currencyUtils = FittorCurrency();
// Create a currency text widgetWidget priceText = currencyUtils.currencyText(
'\$1,234.56',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
);
State Management
Overview
Fittor is a pragmatic state management library designed to make Flutter development more efficient with minimal boilerplate. It offers a controller-based approach, more focused API.
Features
Controller-based state management: Create reactive UIs with minimal code
Dependency injection: Easily register and find controllers throughout your app
Reactive value wrappers: Optimized UI updates with fine-grained reactivity
Bindings system: Organize dependencies by route or feature
Extension methods: Access controllers directly from BuildContext
Auto-disposal: Controllers are automatically managed in the widget lifecycle
Getting Started
1. Initialize Fittor
Initialize Fittor at the root of your application: