Skip to content

Instantly share code, notes, and snippets.

@ryanlid
Created February 16, 2020 15:23
Show Gist options
  • Save ryanlid/5b43f9298940700f7dee643d57d10688 to your computer and use it in GitHub Desktop.
Save ryanlid/5b43f9298940700f7dee643d57d10688 to your computer and use it in GitHub Desktop.
CliOval 圆形剪裁
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