【发布时间】:2019-07-21 20:34:19
【问题描述】:
我正在尝试在应用栏中的标题前添加一个徽标,但似乎图像只占用了前导属性的宽度和高度。
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
Widget build(context){
return Scaffold(
appBar: AppBar(
title:Text('Hi, Andi Loshi'),
backgroundColor: Color.fromRGBO(230, 1, 1,1),
leading: new Image.asset("assets/images/logo.png",
fit:BoxFit.cover,
height:20.00,
width:20.00
),
),
body: Text('Body will reside here')
);
}
}
【问题讨论】: