avatar_view 1.0.0+4 copy "avatar_view: ^1.0.0+4" to clipboard
avatar_view: ^1.0.0+4 copied to clipboard

A new Flutter application.

example/lib/main.dart

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)),
              ),
            ],
          ),
        ));
  }
}
24
likes
125
points
346
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter application.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

cached_network_image, cupertino_icons, flutter

More

Packages that depend on avatar_view