intro_slider 1.0.7

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 93

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.0.7

Import

import 'package:intro_slider/intro_slider.dart';

<h2 align="center">Demo</h2>

Button example gif | Custom layout example gif

<h2 align="center">Example</h2>

Default config

default config image

class _MyAppState extends State<MyApp> {
  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: 0xfff5a623,
      ),
    );
    slides.add(
      new Slide(
        title: "PENCIL",
        description: "Ye indulgence unreserved connection alteration appearance",
        pathImage: "images/photo_pencil.png",
        backgroundColor: 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: 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 _MyAppState extends State<MyApp> {
  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",
        backgroundColor: 0xFFFFDEAD,
      ),
    );
    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",
        backgroundColor: 0xffFFFACD,
      ),
    );
    slides.add(
      new Slide(
        title: "COFFEE",
        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",
        backgroundColor: 0xffFFF8DC,
      ),
    );
  }

  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: 0x33000000,
      highlightColorSkipBtn: 0xff000000,

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

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

<h2 align="center">Options</h2>

Slide object attributes

NameTypeDefaultDescription
<b>Title</b>
titleString""Change text title at top
styleTitleTextStyleWhite color, bold and font size is 30.0Style for text title
marginTitleEdgeInsetstop: 70.0, bottom: 50.0Margin for text title
<b>Image</b>
pathImageString""Path to your local image
widthImagedouble250.0Width of image
heightImagedouble250.0Height of image
onImagePressFunctionDo nothingFire when press image
<b>Description</b>
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
<b>Background</b>
backgroundColorint0xfff5a623Background tab color
colorBeginintnullGradient tab color begin
colorEndintnullGradient tab color end
directionColorBeginAlignmentGeometrynullDirection color begin
directionColorEndAlignmentGeometrynullDirection color end

IntroSlider widget attributes

NameTypeDefaultDescription
<b>Slide</b>
slidesSlideNo default, requiredAn array of Slide object
<b>Skip Button</b>
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
colorSkipBtninttransparentColor for Skip button
highlightColorSkipBtnint0x4dffffffColor for Skip button when press
isShowSkipBtnbooltrueShow or hide Skip button
borderRadiusSkipBtndouble30.0Rounded Skip button
<b>Next Button</b>
renderNextBtnWidgetButton with text NEXTRender your own Next button
nameNextBtnString"NEXT"Change SKIP to any text you want
borderRadiusNextBtndouble30.0Rounded Next button
<b>Done Button</b>
renderDoneBtnWidgetButton with text DONERender your own Done button
onDonePressFunctionDo nothingFire when press Skip button
nameDoneBtnString"DONE"Style for text at Skip button
styleNameDoneBtnTextStyleWhite colorColor for Skip button
colorDoneBtninttransparentColor for Skip button when press
highlightColorDoneBtnint0x4dffffffShow or hide Skip button
borderRadiusDoneBtndouble30.0Rounded Done button
<b>Dot Indicator</b>
isShowDotIndicatorbooltrueShow or hide dot indicator
colorDotint0x80000000Color for dot when passive
colorActiveDotint0xffffffffColor for dot when active
sizeDotdouble8.0Size of each dot

Pull request and feedback are always appreciated

1.0.7

  • Add onCLickImage and maxLines text description

1.0.6

  • Add gradient background color

1.0.5

  • Add more attribute

1.0.4

  • Update info

1.0.3

  • Update info

1.0.2

  • Update info

1.0.1

  • Update

1.0.0

  • Update

0.0.1

  • Initial Release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:intro_slider/intro_slider.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

// Custom config
class _MyAppState extends State<MyApp> {
  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: 0xffFFDAB9,
        colorEnd: 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: 0xffFFFACD,
        colorEnd: 0xffFF6347,
        directionColorBegin: Alignment.topRight,
        directionColorEnd: Alignment.bottomLeft,
      ),
    );
    slides.add(
      new Slide(
        title: "COFFEE",
        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: 0xffFFA500,
        colorEnd: 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: 0x33000000,
      highlightColorSkipBtn: 0xff000000,

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

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

//Default config
//class _MyAppState extends State<MyApp> {
//  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: 0xfff5a623,
//      ),
//    );
//    slides.add(
//      new Slide(
//        title: "PENCIL",
//        description: "Ye indulgence unreserved connection alteration appearance",
//        pathImage: "images/photo_pencil.png",
//        backgroundColor: 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: 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,
//    );
//  }
//}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  intro_slider: ^1.0.7

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:intro_slider/intro_slider.dart';
  
Version Uploaded Documentation Archive
1.0.7 Oct 6, 2018 Go to the documentation of intro_slider 1.0.7 Download intro_slider 1.0.7 archive
1.0.6 Aug 30, 2018 Go to the documentation of intro_slider 1.0.6 Download intro_slider 1.0.6 archive
1.0.5 Aug 28, 2018 Go to the documentation of intro_slider 1.0.5 Download intro_slider 1.0.5 archive
1.0.4 Aug 28, 2018 Go to the documentation of intro_slider 1.0.4 Download intro_slider 1.0.4 archive
1.0.3 Aug 28, 2018 Go to the documentation of intro_slider 1.0.3 Download intro_slider 1.0.3 archive
1.0.2 Aug 28, 2018 Go to the documentation of intro_slider 1.0.2 Download intro_slider 1.0.2 archive
1.0.1 Aug 27, 2018 Go to the documentation of intro_slider 1.0.1 Download intro_slider 1.0.1 archive
1.0.0 Aug 27, 2018 Go to the documentation of intro_slider 1.0.0 Download intro_slider 1.0.0 archive
0.0.1 Aug 27, 2018 Go to the documentation of intro_slider 0.0.1 Download intro_slider 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
86
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
93
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6
  • Flutter: 0.11.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8