Advertisement
killtdj

welcome scrren

Oct 4th, 2022
1,002
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.26 KB | None | 0 0
  1. import 'package:dudidam/screens/home.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:introduction_screen/introduction_screen.dart';
  4.  
  5. class WelcomePage extends StatefulWidget {
  6.   const WelcomePage({super.key});
  7.  
  8.   @override
  9.   State<WelcomePage> createState() => _WelcomePageState();
  10. }
  11.  
  12. class _WelcomePageState extends State<WelcomePage> {
  13.   @override
  14.   Widget build(BuildContext context) {
  15.     const pageDecoration = PageDecoration(
  16.         titleTextStyle: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
  17.         bodyTextStyle: TextStyle(fontSize: 19),
  18.         bodyPadding: EdgeInsets.all(16));
  19.     return IntroductionScreen(
  20.       globalBackgroundColor: Colors.white,
  21.       pages: [
  22.         PageViewModel(
  23.           title: "DUDIDAM",
  24.           body: "Aplikasi Streaming Video Animasi",
  25.           image: Image.network(
  26.               'https://res.cloudinary.com/killtdj/image/upload/v1664861193/undraw_horror_movie_3988_oajngg.png',
  27.               width: 350),
  28.           decoration: pageDecoration,
  29.         ),
  30.         PageViewModel(
  31.             title: "DUDIDAM",
  32.             body: "Aplikasi Streaming Video Animasi",
  33.             image: Image.network(
  34.                 'https://res.cloudinary.com/killtdj/image/upload/v1664861557/undraw_Video_streaming_re_v3qg_n1wiut.png',
  35.                 width: 350),
  36.             decoration: pageDecoration,
  37.             footer: ElevatedButton(
  38.               onPressed: () {},
  39.               child: const Text('Start Watching'),
  40.             ))
  41.       ],
  42.       onDone: () {
  43.         Navigator.pushReplacement(context,
  44.             MaterialPageRoute(builder: (builder) {
  45.           return const HomePage();
  46.         }));
  47.       },
  48.       showSkipButton: false,
  49.       showBackButton: true,
  50.       showNextButton: true,
  51.       showDoneButton: true,
  52.       back: const Icon(Icons.arrow_back),
  53.       next: const Icon(Icons.arrow_forward_rounded),
  54.       done: const Text(
  55.         'Done',
  56.         style: TextStyle(fontWeight: FontWeight.bold),
  57.       ),
  58.       dotsDecorator: const DotsDecorator(
  59.           size: Size(10, 10),
  60.           color: Colors.green,
  61.           activeSize: Size(22, 10),
  62.           activeShape: RoundedRectangleBorder(
  63.               borderRadius: BorderRadius.all(Radius.circular(25)))),
  64.     );
  65.   }
  66. }
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement