सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक फ्लटर पैकेज जो पूरी तरह से कस्टमाइज़ेबल और संपादन योग्य छवि विजेट बनाने की अनुमति देता है, जिससे उपयोगकर्ता ऐप के भीतर छवि को सीधे संपादित कर सकते हैं। इसमें क्रॉपिंग, आकार बदलने और स्थिति बदलने जैसी इंटरैक्टिव विशेषताएं समर्थित हैं, जो प्रोफाइल छवियों, एवाटार और चैट हेड्स के लिए आदर्श हैं। यह पैकेज एंड्रॉइड, आईओएस और मैकओएस प्लेटफॉर्म पर बिना किसी दिक्कत के एकीकरण के लिए डिज़ाइन किया गया है, जो डेवलपर्स को UI डिज़ाइन और उपयोगकर्ता इंटरैक्शन में लचीलापन प्रदान करता है। साफ एपीआई और प्रतिक्रियाशील व्यवहार के साथ, यह डायनामिक छवि संपादन की आवश्यकता वाले ऐप्स में उपयोगकर्ता अनुभव को बढ़ाता है।
उपयोग
प्रोफ़ाइल छवि संपादन
एवतार कस्टमाइज़ेशन
चैट हेड इमेज संशोधन
उपयोगकर्ता-उत्पादित सामग्री निर्माण
इंटरैक्टिव इमेज ओवरले
मुख्य विशेषताएँ
कस्टमाइज़ किए गए छवि संपादन
क्रॉस-प्लेटफ़ॉर्म समर्थन (Android, iOS, macOS)
इंटरैक्टिव क्रॉपिंग और आकार समायोजन
प्रतिक्रियाशील UI घटक
मौजूदा फ्लटर ऐप्स के साथ आसान एकीकरण
इनके लिए उपयुक्त
सोशल मीडिया ऐप्स
उपयोगकर्ता प्रोफ़ाइल प्रबंधन
संदेश एप्लिकेशन
फोटो संपादन उपकरण
कस्टम UI घटक
विचार योग्य बातें
छवि रिज़ॉल्यूशन के सावधानीपूर्वक निपटान की आवश्यकता होती है
बड़े चित्रों के साथ प्रदर्शन पर प्रभाव पड़ सकता है
मूलभूत संपादन विशेषताओं तक सीमित
उन्नत फोटो संपादन के लिए उपयुक्त नहीं
प्लेटफॉर्म-विशिष्ट रेंडरिंग व्यवहार पर निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Editable Image | Flutter Package
Flutter package for creating a fully customizable and editable image widget. The package has been written solely in Dart Language.
Features
A powerful and fully customizable widget. It provides a custom widget to save time.
For example, almost in every profile settings interface, etc., there is a profile image. Instead of writing from scratch, this widget can be used and can save a lot of time.
Getting started
Let's take a look at how to implement EditableImage to fastly create user interfaces for profile picture edit, etc.
Please upgrade the Kotlin version (ext.kotlin_version) to 1.7.0 or the latest version. To do that, find the following line inside android/build.gradle and modify it:
ext.kotlin_version = '1.7.0'
Please upgrade the Gradle version (ext.kotlin_version) to 6.8.3 or the latest version but lower than 7.0.0. To do that, find the following line inside android/gradle/wrapper/gradle-wrapper.properties and modify it:
I recommand you add android:requestLegacyExternalStorage="true" to AndroidManifest.xml. Therefore, please modify android/app/src/main/AndroidManifest.xml and add the following line inside application:
If you found some warning logs with Glide appearing, then the main project needs an implementation of AppGlideModule. See Generated API.
iOS Setup
Platform version must be at least 9.0. Please modify ios/Podfile and update accordingly:
platform :ios, '11.0'
Add the following lines to ios/Runner/Info.plist:
<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict><key>NSPhotoLibraryUsageDescription</key><string>Put here your permission description.</string>
macOS Setup
Platform version must be at least 10.15. Please modify macos/Podfile and update accordingly:
platform :osx, '10.15'
Please set the minimum deployment target to 10.15. Use XCode to open macos/Runner.xcworkspace:
Follow the iOS instructions and modify ios/Runner/Info.plist accordingly.
Usage
Basic usage example:
main.dart
// A simple usage of EditableImage.// This method gets called when trying to change an image.void_directUpdateImage(File? file) async {
if (file == null) return;
setState(() {
_profilePicFile = file;
});
}
EditableImage(
// Define the method that will run on the change process of the image.
onChange: (file) => _directUpdateImage(file),
// Define the source of the image.
image: _profilePicFile != null
? Image.file(_profilePicFile!, fit: BoxFit.cover)
: null,
// Define the size of EditableImage.
size: 150.0,
// Define the Theme of image picker.
imagePickerTheme: ThemeData(
// Define the default brightness and colors.
primaryColor: Colors.white,
shadowColor: Colors.transparent,
backgroundColor: Colors.white70,
iconTheme: constIconThemeData(color: Colors.black87),
// Define the default font family.
fontFamily: 'Georgia',
),
// Define the border of the image if needed.
imageBorder: Border.all(color: Colors.black87, width: 2.0),
// Define the border of the icon if needed.
editIconBorder: Border.all(color: Colors.black87, width: 2.0),
),
Example
More examples can be found in /example folder on GitHub.
User Profile 1 - an example of basic implementation of EditableImage. Simple project that simulates user profile edit screen.
User Profile 2 - an example of implementation of EditableImage. Simple project that simulates user profile edit screen.
Additional information
This package has been written solely in Dart Language yet it has the wechat_assets_picker as a dependency. Therefore, EditableImage currently supports only Android, iOS, and macOS platforms. In the future, other platform supports may be added.