circular_profile_avatar 0.2.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 94

circular_profile_avatar #

CircularProfileAvatar is a Flutter package which allows developers to implement circular profile avatar with border, overlay, initialsText and many other awesome features, which simplifies developers job. It is an alternative to Flutter's CircleAvatar Widget.

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
   circular_profile_avatar: ^0.2.0

and run

 flutter packages get

Usage #

    CircularProfileAvatar(
          'https://avatars0.githubusercontent.com/u/8264639?s=460&v=4', //sets image path, it should be a URL string. default value is empty string, if path is empty it will display only initials
          radius: 100, // sets radius, default 50.0              
          backgroundColor: Colors.transparent, // sets background color, default Colors.white
          borderWidth: 10,  // sets border, default 0.0
          initialsText: Text(
            "AD",
            style: TextStyle(fontSize: 40, color: Colors.white),
          ),  // sets initials text, set your own style, default Text('')
          borderColor: Colors.brown, // sets border color, default Colors.white
          elevation: 5.0, // sets elevation (shadow of the profile picture), default value is 0.0
          foregroundColor: Colors.brown.withOpacity(0.5), //sets foreground colour, it works if showInitialTextAbovePicture = true , default Colors.transparent
          cacheImage: true, // allow widget to cache image against provided url
          onTap: () {
            print('adil');
          }, // sets on tap 
          showInitialTextAbovePicture: true, // setting it true will show initials text above profile picture, default false  
          )
    )

If this project help you reduce time to develop, you can give me a cup of coffee :)

Give me through Paypal ->

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.2.0] - 8 May 2019

upgraded dependencies

[0.1.9] - 8 May 2019

added image error widget, fixed small issues

[0.1.8] - 8 May 2019

Fixed some issues, added image placeholder widget

[0.1.6] - 2 January 2019

Added image cache

[0.1.5] - 30 December 2018

Fixed hot reload issue

[0.1.4] - 29 December 2018

Implemented properties like borderColor,borderWidth, backgroundColor, foregroundColor, onTap, elevation, initialsText.

example/README.md

example #

    class _MyHomePageState extends State<MyHomePage> {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
            appBar: AppBar(
              title: Text(widget.title),
            ),
            body: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: <Widget>[
                  CircularProfileAvatar(
                   'https://avatars0.githubusercontent.com/u/8264639?s=460&v=4',
                      radius: 100,
                      backgroundColor: Colors.green,
                      borderWidth: 10,
                      initialsText: Text(
                        "AD",
                        style: TextStyle(fontSize: 40, color: Colors.white),
                      ),
                      borderColor: Colors.brown,
                      elevation: 5.0,
                      onTap: () {
                        print('adil');
                      },
                      ),
                  CircularProfileAvatar(
                  'https://avatars0.githubusercontent.com/u/8264639?s=460&v=4',
                      radius: 120,
                      backgroundColor: Colors.green,
                      borderWidth: 10,
                      initialsText: Text(
                        "AD",
                        style: TextStyle(fontSize: 40, color: Colors.white),
                      ),
                      borderColor: Colors.yellow,
                      elevation: 5.0,
                      foregroundColor: Colors.yellow.withOpacity(0.5),
                      onTap: () {
                        print('adil');
                      },
                      showInitialTextAbovePicture: true,
                      ),
                  CircularProfileAvatar(
                      radius: 70,
                      backgroundColor: Colors.green,
                      initialsText: Text(
                        "AD",
                        style: TextStyle(fontSize: 40, color: Colors.white),
                      ),
                      elevation: 5.0,
                  ),
    
                ],
              ),
            ));
      }
    }

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  circular_profile_avatar: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:circular_profile_avatar/circular_profile_avatar.dart';
  
Version Uploaded Documentation Archive
0.2.0 May 9, 2019 Go to the documentation of circular_profile_avatar 0.2.0 Download circular_profile_avatar 0.2.0 archive
0.1.9 May 8, 2019 Go to the documentation of circular_profile_avatar 0.1.9 Download circular_profile_avatar 0.1.9 archive
0.1.8 May 8, 2019 Go to the documentation of circular_profile_avatar 0.1.8 Download circular_profile_avatar 0.1.8 archive
0.1.7 Mar 16, 2019 Go to the documentation of circular_profile_avatar 0.1.7 Download circular_profile_avatar 0.1.7 archive
0.1.6 Jan 2, 2019 Go to the documentation of circular_profile_avatar 0.1.6 Download circular_profile_avatar 0.1.6 archive
0.1.5 Dec 30, 2018 Go to the documentation of circular_profile_avatar 0.1.5 Download circular_profile_avatar 0.1.5 archive
0.1.4 Dec 29, 2018 Go to the documentation of circular_profile_avatar 0.1.4 Download circular_profile_avatar 0.1.4 archive
0.1.3 Dec 29, 2018 Go to the documentation of circular_profile_avatar 0.1.3 Download circular_profile_avatar 0.1.3 archive
0.1.2 Dec 29, 2018 Go to the documentation of circular_profile_avatar 0.1.2 Download circular_profile_avatar 0.1.2 archive
0.1.1 Dec 29, 2018 Go to the documentation of circular_profile_avatar 0.1.1 Download circular_profile_avatar 0.1.1 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
88
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on Jun 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.17
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/circular_profile_avatar.dart.

Run flutter format to format lib/circular_profile_avatar.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cached_network_image ^0.8.0 0.8.0
flutter 0.0.0
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
flutter_cache_manager 0.3.2
http 0.12.0+2
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.2
path_provider 0.5.0+1 1.1.0
pedantic 1.7.0
sky_engine 0.0.99
source_span 1.5.5
sqflite 1.1.5
string_scanner 1.0.4
synchronized 2.1.0
term_glyph 1.1.0
typed_data 1.1.6
uuid 2.0.2
vector_math 2.0.8
Dev dependencies
flutter_test