Skip to content

Commit

Permalink
fix(scroll): Remove NotificationListener for PageView children #208
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyozer committed Mar 23, 2024
1 parent 0ad0cf3 commit e705f9d
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions lib/src/introduction_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,16 @@ class IntroductionScreenState extends State<IntroductionScreen> {
);
}

final pages = widget.pages
?.mapIndexed((index, page) => IntroPage(
page: page,
scrollController: CustomList(
widget.scrollControllers,
)?.elementAtOrNull(index),
))
.toList() ??
widget.rawPages!;

return SafeArea(
left: widget.safeAreaList[0],
right: widget.safeAreaList[1],
Expand Down Expand Up @@ -631,17 +641,12 @@ class IntroductionScreenState extends State<IntroductionScreen> {
: !widget.canProgress(getCurrentPage())
? const NeverScrollableScrollPhysics()
: widget.scrollPhysics,
children: widget.pages
?.mapIndexed(
(index, page) => IntroPage(
page: page,
scrollController: CustomList(
widget.scrollControllers,
)?.elementAtOrNull(index),
),
)
.toList() ??
widget.rawPages!,
children: pages
.map((page) => NotificationListener(
onNotification: (_) => true,
child: page,
))
.toList(),
),
),
),
Expand Down

0 comments on commit e705f9d

Please sign in to comment.