你好,我试图调整图像的大小,但我却无法按照Resize leading widget in flutter AppBar
进行操作
但是在cupertinoNavigationBar的情况下不起作用。我在这里缺少什么。
class ProductOverViewScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (Platform.isIOS) {
return CupertinoPageScaffold(
backgroundColor: Colors.grey[300],
navigationBar: CupertinoNavigationBar(
automaticallyImplyLeading: false,
leading: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 100,
height: 100,
child: Image.asset(
'assets/images/logo.png',
),
),
Container()
],
),
backgroundColor: AppColors.red,
trailing: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Icon(
Icons.shopping_cart,
color: Colors.white,
),
SizedBox(width: 10),
GestureDetector(
child: Icon(
Icons.search,
color: Colors.white,
),
onTap: () {
print('presse');
},
),
]),
),
child: _buildContent(context),
);
}