flutter_carousel_intro 0.0.12 copy "flutter_carousel_intro: ^0.0.12" to clipboard
flutter_carousel_intro: ^0.0.12 copied to clipboard

A Carousel widget for introductory presentation.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_carousel_intro/flutter_carousel_intro.dart';
import 'package:flutter_carousel_intro/utils/enums.dart';
import 'package:flutter_svg/svg.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(useMaterial3: true),
      debugShowCheckedModeBanner: true,
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: MySlideShow(),
    );
  }
}

class MySlideShow extends StatelessWidget {
  const MySlideShow({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return FlutterCarouselIntro(
      animatedRotateX: true,
      animatedRotateZ: true,
      scale: true,
      autoPlay: true,
      autoPlaySlideDuration: const Duration(seconds: 2),
      animatedOpacity: true,
      primaryBullet: 20,
      secondaryBullet: 12,
      primaryColor: Colors.pink,
      secondaryColor: Colors.grey,
      dotsCurve: Curves.easeInOutCubicEmphasized,
      scrollDirection: Axis.vertical,
      indicatorAlign: IndicatorAlign.left,
      slides: [
        SvgPicture.asset("assets/slide-1.svg"),
        SvgPicture.asset("assets/slide-2.svg"),
        SvgPicture.asset("assets/slide-3.svg"),
        SvgPicture.asset("assets/slide-4.svg"),
        SvgPicture.asset("assets/slide-5.svg"),
      ],
    );
  }
}
31
likes
140
pub points
61%
popularity

Publisher

unverified uploader

A Carousel widget for introductory presentation.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider

More

Packages that depend on flutter_carousel_intro