36 lines
817 B
Dart
36 lines
817 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ProfilePicture extends StatelessWidget {
|
|
|
|
const ProfilePicture({Key key, this.imageUrl}) : super(key: key);
|
|
|
|
final String imageUrl;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 114,
|
|
width: 114,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
image: DecorationImage(
|
|
image: NetworkImage(imageUrl),
|
|
fit: BoxFit.cover,
|
|
),
|
|
border: Border.all(
|
|
color: Colors.white,
|
|
width: 4,
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 2,
|
|
blurRadius: 2,
|
|
offset: Offset(0, 1), // changes position of shadow
|
|
)
|
|
]
|
|
),
|
|
);
|
|
}
|
|
}
|