Created
February 16, 2020 15:23
-
-
Save ryanlid/5b43f9298940700f7dee643d57d10688 to your computer and use it in GitHub Desktop.
CliOval 圆形剪裁
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: "CliOval圆形剪裁示例", | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text( | |
"ClipOval圆形剪裁示例", | |
style: TextStyle(color: Colors.white), | |
), | |
), | |
body: Center( | |
child: ClipOval( | |
child: SizedBox( | |
width: 300.0, | |
height: 300.0, | |
child: Image.network( | |
"https://images.oonnnoo.com/appicons/alipay.png", | |
fit: BoxFit.fill, | |
), | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment