1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-15 09:56:15 +01:00
git-touch-android-ios-app/lib/widgets/avatar.dart
Rongjian Zhang 9ce9589b2c fix: styles
2019-02-03 00:28:51 +08:00

27 lines
608 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import '../screens/screens.dart';
import 'link.dart';
class Avatar extends StatelessWidget {
final String login;
final String url;
Avatar(this.login, this.url);
@override
Widget build(BuildContext context) {
return Link(
onTap: () {
Navigator.of(context)
.push(CupertinoPageRoute(builder: (_) => UserScreen(login)));
},
child: CircleAvatar(
backgroundColor: Colors.transparent,
backgroundImage: NetworkImage(url),
radius: 18,
),
);
}
}