美文网首页Flutter
Flutter 圆形图片处理

Flutter 圆形图片处理

作者: 三只仓鼠 | 来源:发表于2020-02-02 01:27 被阅读0次
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        // TODO: implement build
        return MaterialApp(
          home: Scaffold(
            appBar: AppBar(
              centerTitle: true,
              title: Text("Demo"),
            ),
            body: MyHomePage(),
          ),
        );
      }
    }
    
    class MyHomePage extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        // TODO: implement build
        return Center(child: Container(
          child: ClipOval(child: Image.network("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1580587706041&di=0d6e369fc135a9c427cda631e10ebe22&imgtype=0&src=http%3A%2F%2Fwww.beihaiting.com%2Fuploads%2Fallimg%2F170330%2F10723-1F3301UI5427.jpg"),),
        ));
      }
    }
    
    

    相关文章

      网友评论

        本文标题:Flutter 圆形图片处理

        本文链接:https://www.haomeiwen.com/subject/kpyfxhtx.html