Rounded Avatar

A customizable widget for displaying rounded avatars in Flutter applications. Supports both network and local images, including SVGs, and offers various customization options such as border color, border width, border radius, and image fit.

Features

  • Network & Local Images: Load avatars from the web or local assets.
  • SVG Support: Handle SVG images effortlessly.
  • Customizable Borders: Set border color, width, and radius.
  • Flexible Image Fit: Control how the image is inscribed into the box.

Screenshots

project-preview

Installation

Add the following to your pubspec.yaml:

dependencies:
  rounded_avatar: ^1.0.0

Usage

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Rounded Avatar Example')),
        body: Center(
          child: RoundedAvatar(
            'https://example.com/avatar.svg',  // For network SVG
            width: 100.0,
            height: 100.0,
            borderColor: Colors.blue,
            borderWidth: 2.0,
            borderRadius: BorderRadius.circular(50.0),  // Circle if zero, otherwise rectangle
            fit: BoxFit.cover,
            isSvg: true,
            httpHeaders: {'Authorization': 'Bearer token'},
          ),
        ),
      ),
    );
  }
}

Gamify UI Kit

Gamify ui kit - Codecanyon Gamify ui kit - Gumroad

Support

If you find this package useful, consider buying me a coffee to support further development.

Buy Me A Coffee

Buy Me A Coffee

🛡️ License

This project is licensed under the Apache License 2.0