user_profile_avatar 0.1.0 copy "user_profile_avatar: ^0.1.0" to clipboard
user_profile_avatar: ^0.1.0 copied to clipboard

outdated

A simple widget that display round profile picture and display native circular progress indicator whilst image is being fetched.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: HomePage(),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: UserProfileAvatar(
        avatarUrl: 'https://picsum.photos/id/237/5000/5000',
        onAvatarTap: () {
          ScaffoldMessenger.of(context).showSnackBar(
            SnackBar(
              content: Text('Tapped on avatar'),
            ),
          );
        },
        notificationCount: 10,
        notificationBubbleTextStyle: TextStyle(
          fontSize: 30,
          color: Colors.white,
          fontWeight: FontWeight.bold,
        ),
        avatarSplashColor: Colors.purple,
        radius: 100,
        isActivityIndicatorSmall: false,
        avatarBorderData: AvatarBorderData(
          borderColor: Colors.black54,
          borderWidth: 5.0,
        ),
      ),
    );
  }
}
35
likes
0
pub points
81%
popularity

Publisher

unverified uploader

A simple widget that display round profile picture and display native circular progress indicator whilst image is being fetched.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, flutter

More

Packages that depend on user_profile_avatar