Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:dudidam/screens/home.dart';
- import 'package:flutter/material.dart';
- import 'package:introduction_screen/introduction_screen.dart';
- class WelcomePage extends StatefulWidget {
- const WelcomePage({super.key});
- @override
- State<WelcomePage> createState() => _WelcomePageState();
- }
- class _WelcomePageState extends State<WelcomePage> {
- @override
- Widget build(BuildContext context) {
- const pageDecoration = PageDecoration(
- titleTextStyle: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
- bodyTextStyle: TextStyle(fontSize: 19),
- bodyPadding: EdgeInsets.all(16));
- return IntroductionScreen(
- globalBackgroundColor: Colors.white,
- pages: [
- PageViewModel(
- title: "DUDIDAM",
- body: "Aplikasi Streaming Video Animasi",
- image: Image.network(
- 'https://res.cloudinary.com/killtdj/image/upload/v1664861193/undraw_horror_movie_3988_oajngg.png',
- width: 350),
- decoration: pageDecoration,
- ),
- PageViewModel(
- title: "DUDIDAM",
- body: "Aplikasi Streaming Video Animasi",
- image: Image.network(
- 'https://res.cloudinary.com/killtdj/image/upload/v1664861557/undraw_Video_streaming_re_v3qg_n1wiut.png',
- width: 350),
- decoration: pageDecoration,
- footer: ElevatedButton(
- onPressed: () {},
- child: const Text('Start Watching'),
- ))
- ],
- onDone: () {
- Navigator.pushReplacement(context,
- MaterialPageRoute(builder: (builder) {
- return const HomePage();
- }));
- },
- showSkipButton: false,
- showBackButton: true,
- showNextButton: true,
- showDoneButton: true,
- back: const Icon(Icons.arrow_back),
- next: const Icon(Icons.arrow_forward_rounded),
- done: const Text(
- 'Done',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- dotsDecorator: const DotsDecorator(
- size: Size(10, 10),
- color: Colors.green,
- activeSize: Size(22, 10),
- activeShape: RoundedRectangleBorder(
- borderRadius: BorderRadius.all(Radius.circular(25)))),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement