我有一個ListView.separated小部件沒有顯示 Android 的過度滾動效果。在 iOS 上我可以看到彈跳,但在 Android 上沒有顯示發光效果,我不知道為什么。
我的目的是為 Android 提供發光效果。
這是我的一段代碼結構:
SafeArea(
child: LayoutBuilder(
builder: (context, constraints) {
return Container(
...
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
...
ListView.separated(...)
],
],
),
);
},
),
我使用 Flutter 2.8.1 版本。
uj5u.com熱心網友回復:
在查看小部件樹后,我注意到我有一個名為的小部件NotificationListener<OverscrollIndicatorNotification>,我不允許使用發光效果。看來,此設定已應用于小部件樹。
我的解決方案是將我的串列包裝在其他NotificationListener小部件中。做完之后,發光的效果立刻出現了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/429937.html
