FLUTTER INTRO SLIDER

A plugin to help you make intro screens to show the major features of your app. You can change the image, button, text style, color, and more things. Create intro screens is never been more quick and easy than this

Add to pubspec.yaml file

dependencies:
  intro_slider: ^1.1.2

Import

import 'package:intro_slider/intro_slider.dart';

Demo

Button example gif | Custom layout example gif

Example

Default config

default config image

class MySplashScreenState extends State<MySplashScreen> {
  List<Slide> slides = new List();

  @override
  void initState() {
    super.initState();

    slides.add(
      new Slide(
        title: "ERASER",
        description: "Allow miles wound place the leave had. To sitting subject no improve studied limited",
        pathImage: "images/photo_eraser.png",
        backgroundColor: Color(0xfff5a623),
      ),
    );
    slides.add(
      new Slide(
        title: "PENCIL",
        description: "Ye indulgence unreserved connection alteration appearance",
        pathImage: "images/photo_pencil.png",
        backgroundColor: Color(0xff203152),
      ),
    );
    slides.add(
      new Slide(
        title: "RULER",
        description:
            "Much evil soon high in hope do view. Out may few northward believing attempted. Yet timed being songs marry one defer men our. Although finished blessing do of",
        pathImage: "images/photo_ruler.png",
        backgroundColor: Color(0xff9932CC),
      ),
    );
  }

  void onDonePress() {
    // TODO: go to next screen
  }

  void onSkipPress() {
    // TODO: go to next screen
  }

  @override
  Widget build(BuildContext context) {
    return new IntroSlider(
      slides: this.slides,
      onDonePress: this.onDonePress,
      onSkipPress: this.onSkipPress,
    );
  }
}

Custom config

custom config image

class MySplashScreenState extends State<MySplashScreen> {
  List<Slide> slides = new List();

  @override
  void initState() {
    super.initState();

    slides.add(
      new Slide(
        title: "SCHOOL",
        styleTitle:
            TextStyle(color: Color(0xffD02090), fontSize: 30.0, fontWeight: FontWeight.bold, fontFamily: 'RobotoMono'),
        description: "Allow miles wound place the leave had. To sitting subject no improve studied limited",
        styleDescription:
            TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
        pathImage: "images/photo_school.png",
        colorBegin: Color(0xffFFDAB9),
        colorEnd: Color(0xff40E0D0),
        directionColorBegin: Alignment.topLeft,
        directionColorEnd: Alignment.bottomRight,
        onImagePress: () {},
      ),
    );
    slides.add(
      new Slide(
        title: "MUSEUM",
        styleTitle:
            TextStyle(color: Color(0xffD02090), fontSize: 30.0, fontWeight: FontWeight.bold, fontFamily: 'RobotoMono'),
        description: "Ye indulgence unreserved connection alteration appearance",
        styleDescription:
            TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
        pathImage: "images/photo_museum.png",
        colorBegin: Color(0xffFFFACD),
        colorEnd: Color(0xffFF6347),
        directionColorBegin: Alignment.topRight,
        directionColorEnd: Alignment.bottomLeft,
      ),
    );
    slides.add(
      new Slide(
        title: "COFFEE COFFEE COFFEE COFFEE COFFEE COFFEE COFFEE COFFEE COFFEE",
        maxLineTitle: 2,
        styleTitle:
            TextStyle(color: Color(0xffD02090), fontSize: 30.0, fontWeight: FontWeight.bold, fontFamily: 'RobotoMono'),
        description:
            "Much evil soon high in hope do view. Out may few northward believing attempted. Yet timed being songs marry one defer men our. Although finished blessing do of",
        styleDescription:
            TextStyle(color: Color(0xffD02090), fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
        pathImage: "images/photo_coffee_shop.png",
        colorBegin: Color(0xffFFA500),
        colorEnd: Color(0xff7FFFD4),
        directionColorBegin: Alignment.topCenter,
        directionColorEnd: Alignment.bottomCenter,
        maxLineTextDescription: 3,
      ),
    );
  }

  void onDonePress() {
    // TODO: go to next screen
  }

  void onSkipPress() {
    // TODO: go to next screen
  }

  Widget renderNextBtn() {
    return Icon(
      Icons.navigate_next,
      color: Color(0xffD02090),
      size: 35.0,
    );
  }

  Widget renderDoneBtn() {
    return Icon(
      Icons.done,
      color: Color(0xffD02090),
    );
  }

  Widget renderSkipBtn() {
    return Icon(
      Icons.skip_next,
      color: Color(0xffD02090),
    );
  }

  @override
  Widget build(BuildContext context) {
    return new IntroSlider(
      // List slides
      slides: this.slides,

      // Skip button
      renderSkipBtn: this.renderSkipBtn(),
      onSkipPress: this.onSkipPress,
      colorSkipBtn: Color(0x33000000),
      highlightColorSkipBtn: Color(0xff000000),

      // Next, Done button
      onDonePress: this.onDonePress,
      renderNextBtn: this.renderNextBtn(),
      renderDoneBtn: this.renderDoneBtn(),
      colorDoneBtn: Color(0x33000000),
      highlightColorDoneBtn: Color(0xff000000),

      // Dot indicator
      colorDot: Color(0x33D02090),
      colorActiveDot: Color(0xffD02090),
      sizeDot: 13.0,
    );
  }
}

Options

Slide object attributes

NameTypeDefaultDescription
Title
titleString""Change text title at top
maxLineTitleint1Change max number of lines title at top
styleTitleTextStyleWhite color, bold and font size is 30.0Style for text title
marginTitleEdgeInsetstop: 70.0, bottom: 50.0Margin for text title
Image
pathImageString""Path to your local image
widthImagedouble250.0Width of image
heightImagedouble250.0Height of image
onCenterItemPressFunctionDo nothingFire when press image
Center widget
centerWidgetWidgetnullYour custom's widget
onCenterItemPressFunctionDo nothingFire when press center widget
Description
descriptionString""Change text description at bottom
maxLineTextDescriptionString100Maximum line of text description
styleDescriptionTextStyleWhite and font size is 18.0Style for text description
marginDescriptionEdgeInsetsleft, right = 20.0, top, bottom = 50.0Margin for text description
Background
backgroundColorColorColor(0xfff5a623)Background tab color
colorBeginColornullGradient tab color begin
colorEndColornullGradient tab color end
directionColorBeginAlignmentGeometrynullDirection color begin
directionColorEndAlignmentGeometrynullDirection color end

IntroSlider widget attributes

NameTypeDefaultDescription
Slide
slidesSlideNo default, requiredAn array of Slide object
Skip Button
renderSkipBtnWidgetButton with text SKIPRender your own SKIP button
onSkipPressFunctionDo nothingFire when press SKIP button
nameSkipBtnString"SKIP"Change SKIP to any text you want
styleNameSkipBtnTextStyleWhite colorStyle for text at SKIP button
colorSkipBtnColortransparentColor for SKIP button
highlightColorSkipBtnColorColor(0x4dffffff)Color for SKIP button when press
isShowSkipBtnbooltrueShow or hide SKIP button
borderRadiusSkipBtndouble30.0Rounded SKIP button
Next Button
renderNextBtnWidgetButton with text NEXTRender your own NEXT button
nameNextBtnString"NEXT"Change NEXT to any text you want
borderRadiusNextBtndouble30.0Rounded NEXT button
Done Button
renderDoneBtnWidgetButton with text DONERender your own DONE button
onDonePressFunctionDo nothingFire when press DONE button
nameDoneBtnString"DONE"Change DONE to any text you want
styleNameDoneBtnTextStyleWhite colorStyle for text at DONE button
colorDoneBtnColortransparentColor for DONE button
highlightColorDoneBtnColorColor(0x4dffffff)Color for DONE button when press
borderRadiusDoneBtndouble30.0Rounded DONE button
Dot Indicator
isShowDotIndicatorbooltrueShow or hide dot indicator
colorDotColorColor(0x80000000)Color for dot when passive
colorActiveDotColorColor(0xffffffff)Color for dot when active
sizeDotdouble8.0Size of each dot

Pull request and feedback are always appreciated

Libraries

intro_slider

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]