You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
677 B
Dart
26 lines
677 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CircularAvatar extends StatelessWidget {
|
|
final String? url;
|
|
final double radius;
|
|
final double width;
|
|
final double height;
|
|
|
|
CircularAvatar({Key? key, this.radius = 70.0, this.width = 70, this.height = 60, this.url}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: width,
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
image: DecorationImage(
|
|
fit: BoxFit.cover,
|
|
image: NetworkImage(url ?? "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png"),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|