@override
Widget build(BuildContext context) {
return new MaterialApp(
title: ‘Image Demo’,
home: new HomePage(),
);
}
}
class HomePage extends StatefulWidget {
@override
State createState() => new _HomePageState();
}
class _HomePageState extends State {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text(‘Web Image Demo Page’),),
body: new ListView(children: [
Container(
margin: EdgeInsets.only(bottom: 12.0),
decoration: BoxDecoration(color: Colors.grey),
child: Column(children: [
Image.network(
‘https://raw.githubusercontent.com/flutter/website/master/_includes/code/layout/lakes/images/lake.jpg’,
),
Text(‘Image.network’)
],),
),
Container(
margin: EdgeInsets.only(bottom: 12.0),
decoration: BoxDecoration(color: Colors.grey),
child: Column(children: [
Image.network(
‘https://github.com/flutter/plugins/raw/master/packages/video_player/doc/demo_ipod.gif?raw=true’,
),
Text(‘Image.network Animated Gifs’)
],),
),
],),
);
}
}