mirror of
https://github.com/git-touch/git-touch
synced 2025-02-21 05:51:06 +01:00
feat: add avatar placeholder
This commit is contained in:
parent
c6d9b067b1
commit
c300113b8a
BIN
images/octoface.png
Normal file
BIN
images/octoface.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
@ -18,10 +18,16 @@ class Avatar extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Link(
|
||||
screenBuilder: (_) => UserScreen(login),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundImage: NetworkImage(url),
|
||||
radius: size,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(size),
|
||||
child: FadeInImage.assetNetwork(
|
||||
placeholder: 'images/octoface.png',
|
||||
image: url,
|
||||
width: 2 * size,
|
||||
height: 2 * size,
|
||||
fadeInDuration: Duration(milliseconds: 200),
|
||||
fadeOutDuration: Duration(milliseconds: 100),
|
||||
),
|
||||
),
|
||||
material: false,
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user