Skip to content

Commit e705f9d

Browse files
committed
fix(scroll): Remove NotificationListener for PageView children #208
1 parent 0ad0cf3 commit e705f9d

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

lib/src/introduction_screen.dart

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,16 @@ class IntroductionScreenState extends State<IntroductionScreen> {
603603
);
604604
}
605605

606+
final pages = widget.pages
607+
?.mapIndexed((index, page) => IntroPage(
608+
page: page,
609+
scrollController: CustomList(
610+
widget.scrollControllers,
611+
)?.elementAtOrNull(index),
612+
))
613+
.toList() ??
614+
widget.rawPages!;
615+
606616
return SafeArea(
607617
left: widget.safeAreaList[0],
608618
right: widget.safeAreaList[1],
@@ -631,17 +641,12 @@ class IntroductionScreenState extends State<IntroductionScreen> {
631641
: !widget.canProgress(getCurrentPage())
632642
? const NeverScrollableScrollPhysics()
633643
: widget.scrollPhysics,
634-
children: widget.pages
635-
?.mapIndexed(
636-
(index, page) => IntroPage(
637-
page: page,
638-
scrollController: CustomList(
639-
widget.scrollControllers,
640-
)?.elementAtOrNull(index),
641-
),
642-
)
643-
.toList() ??
644-
widget.rawPages!,
644+
children: pages
645+
.map((page) => NotificationListener(
646+
onNotification: (_) => true,
647+
child: page,
648+
))
649+
.toList(),
645650
),
646651
),
647652
),

0 commit comments

Comments
 (0)