どうも、ちょげ(@chogetarou)です。
AppBarの背景を透明にするには、どうしたらいいのでしょうか?
方法

appBar: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
title: Text(
'Hello',
style: TextStyle(color: Colors.black),
),
),
AppBarの背景を透明にするには、引数「elevation」と引数「backgroundColor」を使います。
まず、引数「elevation」には、「0」を設定します。
elevation: 0,
そして、backgroundColorには、「Colors.transparent」を指定します。
backgroundColor: Colors.transparent,
これで、AppBarの背景が透明になります。
コメント