add ScrollController to each ScrollView

fix "The provided ScrollController is currently attached to more than one ScrollPosition"

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-12 11:23:45 +08:00
parent 42d17f9d2b
commit 76e7bf5293
9 changed files with 18 additions and 2 deletions

View File

@@ -133,6 +133,7 @@ class _PortForwardPageState extends State<PortForwardPage>
data: Theme.of(context)
.copyWith(backgroundColor: MyTheme.color(context).bg),
child: Obx(() => ListView.builder(
controller: ScrollController(),
itemCount: pfs.length + 2,
itemBuilder: ((context, index) {
if (index == 0) {
@@ -293,6 +294,7 @@ class _PortForwardPageState extends State<PortForwardPage>
data: Theme.of(context)
.copyWith(backgroundColor: MyTheme.color(context).bg),
child: ListView.builder(
controller: ScrollController(),
itemCount: 2,
itemBuilder: ((context, index) {
if (index == 0) {