Skip to content

Installation

YudizAndroidNaresh edited this page Jan 29, 2025 · 1 revision

Installation Guide

Getting Started

Add avatar_plus to your project by following these simple steps:

1. Add Dependency

Add this line to your pubspec.yaml file:

dependencies:
  avatar_plus: ^1.0.0

2. Install Package

Run this command in your terminal:

flutter pub get

3. Import Package

Add this import statement to your Dart code:

import 'package:avatar_plus/avatar_plus.dart';

Platform Configuration

No additional platform configuration is required! Avatar Plus works out of the box on:

  • ✅ Android
  • ✅ iOS
  • ✅ Web
  • ✅ Desktop (Windows, macOS, Linux)

Verification

To verify the installation, try this simple example:

import 'package:flutter/material.dart';
import 'package:avatar_plus/avatar_plus.dart';

class TestWidget extends StatelessWidget {
  const TestWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return AvatarPlus("Test User");
  }
}

Troubleshooting

Common Installation Issues

  1. Package Not Found

    flutter pub get failed

    Solution: Verify your pubspec.yaml indentation and spelling

  2. Version Conflicts Solution: Check your Flutter version compatibility

  3. Import Errors Solution: Ensure proper package name and import statement

Next Steps

Need help? Create an issue on GitHub.