import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return MaterialApp(
title: "Clip剪裁处理",
theme: ThemeData(
primaryColor: Colors.lightGreen,
),
home: Scaffold(
appBar: AppBar(
title: Text('Clip剪裁处理圆形'),
),
body: Center(
//圆形剪裁
child: ClipOval(
child: SizedBox(
width: 300,
height: 300,
child: Image.asset(
"images/8.jpeg",
fit: BoxFit.fill,
),
),
),
)),
);
}
}
网友评论