Created
January 25, 2022 03:54
-
-
Save sag333ar/98c4f167c04e2af7bd5c5e0251ea265a to your computer and use it in GitHub Desktop.
Custom Circle Avatar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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