Last updated:
0 purchases
rounded avatar
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 #
Installation #
Add the following to your pubspec.yaml:
dependencies:
rounded_avatar: ^1.0.0
copied to clipboard
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'},
),
),
),
);
}
}
copied to clipboard
Sponsor: Gamify UI Kit #
Support #
If you find this package useful, consider buying me a coffee to support further development.
🛡️ License #
This project is licensed under the Apache License 2.0
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.