flutter display images from the Internet

 

Figure

 

 

 

import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var title = 'Web Images';

    return new MaterialApp(
      title: title,
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text(title),
        ),
        body: new Image.network(
          'https://www.baidu.com/img/bd_logo1.png',
        ),
      ),
    );
  }
}

 

Guess you like

Origin www.cnblogs.com/sea-stream/p/12154464.html