सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Fittor एक Flutter पैकेज है जिसका उद्देश्य प्रतिक्रियाशील उपयोगकर्ता इंटरफ़ेस और राज्य प्रबंधन को सरल बनाना है। यह विभिन्न स्क्रीन आकारों और दिशाओं के लिए लेआउट को स्वचालित रूप से अनुकूलित करता है, उपकरणों के माध्यम से स्थिर UI सुनिश्चित करता है। निर्मित प्रतिक्रियाशील उपकरणों का उपयोग करके, Fittor बॉइलरप्लेट कोड को कम करता है और बहु-प्लेटफॉर्म ऐप्स के लिए विकास को सुगम बनाता है। जटिल कॉन्फ़िगरेशन के बिना कुशल, स्केलेबल समाधान की तलाश करने वाले डेवलपर्स के लिए आदर्श। पैकेज सभी प्रमुख प्लेटफॉर्म, जिनमें मोबाइल, वेब और डेस्कटॉप शामिल हैं, का समर्थन करता है, जिससे आधुनिक ऐप विकास के लिए लचीला बनता है।
उपयोग
बहु-उपकरण एप्लिकेशन के लिए प्रतिक्रियाशील लेआउट बनाना
Flutter प्रोजेक्ट में राज्य प्रबंधन को सरल बनाना
विभिन्न स्क्रीन आकारों के लिए अनुकूल उपयोगकर्ता इंटरफेस बनाना
सुसंगत डिज़ाइन के साथ क्रॉस-प्लेटफॉर्म एप्लिकेशन विकसित करना
निर्देशानुसार लेआउट समायोजन का स्वचालन
मैन्युअल मीडिया क्वेरी हैंडलिंग को कम करना
मुख्य विशेषताएँ
स्क्रीन आकारों के लिए स्वचालित प्रतिक्रिया
निर्मित अवस्था प्रबंधन उपकरण
सभी फ्लटर प्लेटफॉर्म के लिए समर्थन
निर्देशांक-जागरूक लेआउट अनुकूलन
न्यूनतम बॉलरप्लेट कोड
pub add के माध्यम से आसान एकीकरण
इनके लिए उपयुक्त
बहुप्लेटफॉर्म के लिए फ्लटर विकासकर्ता
प्रतिक्रियाशील UI डिज़ाइन पर ध्यान केंद्रित टीमें
अनुकूल लेआउट के लिए न्यूनतम सेटअप वाले प्रोजेक्ट
हल्के राज्य प्रबंधन की तलाश कर रहे विकासकर्ता
उपकरणों के बीच सुसंगत उपयोगकर्ता अनुभव की आवश्यकता वाले ऐप
प्रतिक्रियाशील घटकों के साथ त्वरित प्रोटोटाइपिंग
विचार योग्य बातें
नए रिस्पॉन्सिव पैटर्न सीखने की आवश्यकता हो सकती है
पूर्ण कस्टम समाधानों की तुलना में सीमित कस्टमाइजेशन
फ्लटर के रेंडरिंग पाइपलाइन पर निर्भर करता है
अत्यधिक जटिल राज्य प्रवाह के लिए उपयुक्त नहीं
मध्यम से बड़े पैमाने के रिस्पॉन्सिव एप्लिकेशन के लिए सबसे उपयुक्त
Flutter के विजेट ट्री की समझ की आवश्यकता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
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: