【发布时间】:2022-01-13 11:22:14
【问题描述】:
class RoundedImageFile extends StatelessWidget {
final PlatformFile image;
final double size;
const RoundedImageFile({required this.image, required this.size, Key? key})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: size,
width: size,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(image.path!),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.all(Radius.circular(size)),
color: Colors.black,
),
);
}
}
【问题讨论】:
-
请正确添加代码
-
请编辑问题以将其限制为具有足够详细信息的特定问题,以确定适当的答案。
标签: flutter