import 'package:flutter/material.dart';
/**
* 装饰效果之裁剪
* 圆形裁剪
* p223
*/
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return new MaterialApp(
title: 'ClipOval 圆形裁剪',
home: Scaffold(
appBar: AppBar(
title: Text(
'ClipOVal 圆形裁剪示例',
style: TextStyle(color: Colors.white),
),
),
body: Center(
child: new ClipOval(
child: new SizedBox(
width: 300.0,
height: 300.0,
child: new Image.asset(
"images/a.jpg",
fit: BoxFit.fill,
),
),
),
),
),
);
}
}