Flutter 使用远程图片

Flutter 通过 Image 组件显示网络上的图片, Image.network()

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(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter 网络图片'),
        ),
        body: Container(
          child: Image.network(
            'https://www.icode9.com/i/l/?n=18&i=i-beta/1383776/202001/1383776-20200117095609236-1518371407.png'
          ),
        ),
      ),
    );
  }
}
上一篇:《JavaScript 模式》读书笔记(5)— 对象创建模式1


下一篇:pycharm配置 mysql&&diango