1
0
mirror of https://github.com/git-touch/git-touch synced 2025-02-11 00:50:42 +01:00

improvement: update avatar placeholder

This commit is contained in:
Rongjian Zhang 2019-12-22 11:05:55 +08:00
parent d40b877504
commit 79fce4e35d
3 changed files with 4 additions and 7 deletions

BIN
images/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:git_touch/models/theme.dart';
import 'package:git_touch/screens/image_view.dart';
import 'package:provider/provider.dart';
class Avatar extends StatelessWidget {
@ -24,8 +23,8 @@ class Avatar extends StatelessWidget {
child: ClipRRect(
borderRadius: BorderRadius.circular(4),
child: FadeInImage.assetNetwork(
placeholder: 'images/octoface.png',
image: url ?? 'images/octoface.png',
placeholder: 'images/avatar.png',
image: url ?? 'images/avatar.png',
width: size,
height: size,
fadeInDuration: Duration(milliseconds: 200),
@ -33,10 +32,8 @@ class Avatar extends StatelessWidget {
),
),
onTap: () {
// TODO:
// Provider.of<ThemeModel>(context).pushRoute(
// context, (_) => ImageViewScreen(url),
// fullscreenDialog: true);
// Provider.of<ThemeModel>(context).push(
// context, '/$login');
},
);
}