如何在 Flutter 中将 AppBar
标题替换为图片 logo?
最佳答案
title
属性采用 Widget
,因此您可以将任何小部件传递给它。
例如,添加到 Assets 中的图像
Scaffold(
appBar: AppBar(
title: Image.asset('assets/title.png', fit: BoxFit.cover),
),
body: ...
)
More info
https://stackoverflow.com/questions/49983931/