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

outdated

A simple widget that display round profile picture.

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: () {
          Scaffold.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.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, cupertino_icons, flutter

More

Packages that depend on user_profile_avatar