【发布时间】:2022-12-06 18:56:21
【问题描述】:
class AddResultPage extends StatelessWidget {
const AddResultPage({
Key? key,
required this.faceImage,
required this.faceName,
}) : super(key: key);
final File? faceImage;
final String faceName;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
faceImage == null ? Container() : Image.file(faceImage!),
// ignore: prefer_const_constructors
CircleAvatar(
radius: 50,
foregroundImage: ,
),
Text(faceName),
如何在 CircleAvatar 中插入图像? 我不知道为什么它是错误的......
foregroundImage: faceImage,
我不知道如何使用 CircleAvatar,文件路径....
请帮忙....
【问题讨论】: