avatar_view 1.0.0+4 avatar_view: ^1.0.0+4 copied to clipboard
A new Flutter application.
import 'package:avatar_view/avatar_view.dart';
import 'package:example/assets_examples.dart';
import 'package:example/network_examples.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'AvatarView Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'AvatarView Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Colors.grey)),
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) {
return AssetExamples();
}));
},
color: Colors.blue,
textColor: Colors.white,
child: Text("Asset Examples".toUpperCase(),
style: TextStyle(fontSize: 14)),
),
RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Colors.grey)),
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) {
return NetworkExamples();
}));
},
color: Colors.blue,
textColor: Colors.white,
child: Text("Network Examples".toUpperCase(),
style: TextStyle(fontSize: 14)),
),
],
),
));
}
}