rounded_avatar 1.0.2 copy "rounded_avatar: ^1.0.2" to clipboard
rounded_avatar: ^1.0.2 copied to clipboard

RoundedAvatar is a customizable Flutter widget for rounded avatars, supporting network and local images, including SVGs, with border customizations and more options.

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

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

3
likes
160
points
47
downloads

Publisher

verified publisherbuiltbybuilder.com

Weekly Downloads

RoundedAvatar is a customizable Flutter widget for rounded avatars, supporting network and local images, including SVGs, with border customizations and more options.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on rounded_avatar