avatar_better

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

avatar better

This is a complete avatar package that you can use for your profile and avatar
Features #
Features:
✔️ Initial Text: Displaying initial text for avatars or placeholders.
✔️ Random Colors: Generating random colors for various elements.
✔️ Random Linear Gradient: Generating random linear gradient colors.
✔️ Avatar Profile: Creating avatars for profiles or user representation.
✔️ Border Avatar: create a border around the avatar .
✔️ gradient Width Border: Create a gradient color for the borders .
✔️ Use ImageAssets .
✔️ Use ImageNetwork .




Getting started #
dependencies:
avatar_better: ^0.0.8
copied to clipboard
How to use #
import 'package:avatar_better/avatar_better.dart';

copied to clipboard
How to install #
Android #

To request permissions from the user, you can use the following code: AndroidManifest.xml.

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- For Android 10 and above, to access external storage -->
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />

<!-- For Android 12 and above -->
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>


copied to clipboard

For Android versions 33 and above (Android 13):


<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

copied to clipboard

Camera and internet access.


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

copied to clipboard

Add this line code to application AndroidManifest.xml

android:requestLegacyExternalStorage="true"
copied to clipboard
<application
android:label="avaterbetter"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true">
copied to clipboard

Add UCropActivity into your AndroidManifest.xml

<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
copied to clipboard
<queries>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
</queries>

copied to clipboard
iOS #
<key>NSPhotoLibraryUsageDescription</key>
<string>We need access to your photo library to select images for editing.</string>
<key>NSCameraUsageDescription</key>
<string>We need access to your camera to take photos for editing.</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>App needs access to your photo library to read images.</string>

<key>NSMicrophoneUsageDescription</key>
<string>App needs access to the microphone to record audio.</string>

<key>NSPhotoLibraryAddUsageDescription</key>
<string>App needs access to your photo library to save images and videos.</string>



copied to clipboard
macOS installation
Since the macOS implementation uses file_selector, you will need to
add a filesystem access
entitlement:
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
copied to clipboard
Web #

Add following codes inside <head> tag in file web/index.html:


<head>
....

<!-- cropperjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.min.js"></script>

....
</head>


copied to clipboard
example #
Avatar(
text: "Mic",
radius: 50,
showPageViewOnTap: true,
itemsBuilderDropdownMenuItem: (index) {
return [];
},
profileImageViewerOptions: ProfileImageViewerOptions(
fitBackgroundImage: BoxFit.fitHeight,
),
imageNetwork:
"https://platinumlist.net/guide/wp-content/uploads/2023/03/IMG-worlds-of-adventure.webp",
),
copied to clipboard
Avatar.profile(
text: "Mic",
radius: 50,
bottomSheetStyles: BottomSheetStyles(
backgroundColor: Colors.red,
elevation: 2,
middleText: 'OR',
middleTextStyle: const TextStyle(color: Colors.white)),
onPickerChange: () {},
onPickerChangeWeb: (file) { },
optionsCrop: OptionsCrop(),
),
copied to clipboard
Additional information #
If you have any issues, questions, or suggestions related to this package, please feel free to contact us at swan.dev1993@gmail.com. We welcome your feedback and will do our best to address any problems or provide assistance.
For more information about this package, you can also visit our GitHub repository where you can find additional resources, contribute to the package's development, and file issues or bug reports. We appreciate your contributions and feedback, and we aim to make this package as useful as possible for our users.
Thank you for using our package, and we look forward to hearing from you!

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.