avatar_better_pro 0.0.7 copy "avatar_better_pro: ^0.0.7" to clipboard
avatar_better_pro: ^0.0.7 copied to clipboard

This is a complete avatar package that you can use for your profile and avatar.

This is a complete avatar package that you can use for your profile and avatar

Web is Support

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 .

avatar6 avatar5 avatar8 avatar9

Capture3

Getting started #

dependencies:
  avatar_better_pro: ^0.0.7
copied to clipboard

How to use #

import 'package:avatar_better_pro/avatar_better_pro.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.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

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

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>
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

example #

 Avatar(
onTapAvatar: () {},
radius: 35,
text: avatar[index],
randomGradient: true,
randomColor: false,
useMaterialColorForGradient: true,
mixColorForGradient: false,

),,
copied to clipboard

avatar7

 Avatar.profile(
              onPickerChange: (file) {
                setState(() {
                  image = file;
                  //  print("image: ${file.path}");
                });
              },
              onPickerChangeWeb: (file) {
                setState(() {
                  imageByte = file;
                });
              },
              radius: 35,
                  text: avatar[index],
                  randomGradient: true,
                   randomColor: false,
                    useMaterialColorForGradient: true,
                     mixColorForGradient: false,
                      bottomSheetStyles: BottomSheetStyles(
                       galleryButton: GalleryBottom(style: const TextStyle(), color: Colors.amber, text: 'Gallery', icon: const Icon(Icons.image_outlined)),
                    cameraButton: CameraButton(style: const TextStyle(), color: Colors.amber, text: 'Camera', icon: const Icon(Icons.camera_alt_outlined)),
                  backgroundColor: Colors.amberAccent,
               elevation: 2,
            middleText: 'OR',
         middleTextStyle: const TextStyle(),
      ),
  ),
            
                          
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!

3
likes
160
points
60
downloads

Publisher

verified publisherswanflutterdev.com

Weekly Downloads

2024.10.03 - 2025.04.17

This is a complete avatar package that you can use for your profile and avatar.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, image_picker, image_picker_platform_interface, permission_handler

More

Packages that depend on avatar_better_pro