如何splashFactory: NoSplash.splashFactory在flutter默認應用欄后退按鈕上使用?
uj5u.com熱心網友回復:
對你做這樣的事情 AppBar
AppBar(
leading: Navigator.canPop(context)
? IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
icon: const Icon(
Icons.arrow_back,
),
onPressed: () => Navigator.of(context).pop(),
)
: null,
)
通過使用leading屬性覆寫現有的 appBar 圖示并移除飛濺。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/360797.html
