import 'package:desktopapp/widgets/components/tutorials/step1.dart'; import 'package:desktopapp/widgets/components/tutorials/step2.dart'; import 'package:desktopapp/widgets/components/tutorials/step3.dart'; import 'package:flutter/material.dart'; class TutorialPage extends StatelessWidget { TutorialPage({Key? key}) : super(key: key); final PageController videoPageController = PageController( initialPage: 0, viewportFraction: 1, ); void onPrevious() { videoPageController.previousPage( duration: const Duration(milliseconds: 300), curve: Curves.easeIn, ); } void onNext() { videoPageController.nextPage( duration: const Duration(milliseconds: 300), curve: Curves.easeIn, ); } @override Widget build(BuildContext context) { return Scaffold( body: CustomScrollView( controller: videoPageController, scrollDirection: Axis.horizontal, physics: const PageScrollPhysics(), slivers: [ SliverFillViewport( delegate: SliverChildListDelegate([ Step1(onNext: onNext), Step2(onPrevious: onPrevious, onNext: onNext), Step3(onPrevious: onPrevious), ])), ], )); } }