Skip to content

Instantly share code, notes, and snippets.

@sag333ar
Created January 25, 2022 03:54
Show Gist options
  • Save sag333ar/98c4f167c04e2af7bd5c5e0251ea265a to your computer and use it in GitHub Desktop.
Save sag333ar/98c4f167c04e2af7bd5c5e0251ea265a to your computer and use it in GitHub Desktop.
Custom Circle Avatar
import 'package:flutter/material.dart';
class CustomCircleAvatar extends StatelessWidget {
const CustomCircleAvatar(
{Key? key, required this.height, required this.width, required this.url})
: super(key: key);
final double height;
final double width;
final String url;
@override
Widget build(BuildContext context) {
return SizedBox(
height: height,
width: width,
child: CircleAvatar(
backgroundImage: NetworkImage(url),
radius: 100,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment