我试图在操作列表中放置一个CircleAvatar
,AppBar
但 CircleAvatar 会将其高度与 AppBar 的高度保持一致,从而无法调整它的大小并使其保持圆形。我已经尝试将它包装在 Container 或 SizedBox 中,但它不起作用。
例子:
import 'package:flutter/material.dart';
class HoursScreenEmployee extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.white10,
brightness: Brightness.light,
elevation: 0,
centerTitle: false,
actions: [
CircleAvatar(
backgroundImage: NetworkImage("https://picsum.photos/500/300"),
maxRadius: 15,
minRadius: 15,
),
],
title: Text(
"La Chance ",
style: TextStyle(
fontFamily: "Masiva",
fontSize: 27,
fontWeight: FontWeight.w800,
color: Colors.black,
),
),
),
);
}
}