intro_slider 1.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 97

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

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 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() {
    // Do what you want
  }

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

Custom config #

custom config image custom config image

class MySplashScreen extends StatefulWidget {
  MySplashScreen({Key key}) : super(key: key);

  @override
  MySplashScreenState createState() => new MySplashScreenState();
}

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

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

    slides.add(
      new Slide(
        title:
            "A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE A VERY LONG TITLE",
        maxLineTitle: 2,
        styleTitle:
            TextStyle(color: Colors.white, fontSize: 30.0, fontWeight: FontWeight.bold, fontFamily: 'RobotoMono'),
        description:
            "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,",
        styleDescription:
            TextStyle(color: Colors.white, fontSize: 20.0, fontStyle: FontStyle.italic, fontFamily: 'Raleway'),
        marginDescription: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0, bottom: 70.0),
        centerWidget: Text("Replace this with a custom widget", style: TextStyle(color: Colors.white)),
        colorBegin: Color(0xffFFDAB9),
        colorEnd: Color(0xff40E0D0),
        backgroundImage: 'images/photo_eraser.png',
        directionColorBegin: Alignment.topLeft,
        directionColorEnd: Alignment.bottomRight,
        onCenterItemPress: () {},
      ),
    );
    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",
        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() {
    // Do what you want
  }

  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(),
      colorSkipBtn: Color(0x33000000),
      highlightColorSkipBtn: Color(0xff000000),

      // Next button
      renderNextBtn: this.renderNextBtn(),

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

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

      // Locale
      locale: 'en',

      // Show or hide status bar
      shouldHideStatusBar: true,
    );
  }
}

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

Slide object attributes #

NameTypeDefaultDescription
<b>Title</b>
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
<b>Image</b>
pathImageString""Path to your local image
widthImagedouble250.0Width of image
heightImagedouble250.0Height of image
onCenterItemPressFunctionDo nothingFire when press image
<b>Center widget</b>
centerWidgetWidgetnullYour custom's widget
onCenterItemPressFunctionDo nothingFire when press center widget
<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 Color</b>
backgroundColorColorColor(0xfff5a623)Background tab color
colorBeginColornullGradient tab color begin
colorEndColornullGradient tab color end
directionColorBeginAlignmentGeometrynullDirection color begin
directionColorEndAlignmentGeometrynullDirection color end
<b>Background Image</b>
backgroundImageStringnullBackground tab image
backgroundImageFitBoxFitBoxFit.coverBackground tab image fit
backgroundOpacitydouble0.5Background tab image filter opacity
backgroundOpacityColorColorColors.blackBackground tab image filter color
backgroundBlendModeBlendModeBlendMode.darkenBackground tab image filter blend mode

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
widthSkipBtndouble1/4 screen widthWidth of view wrapper 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
<b>Prev Button</b>
renderPrevBtnWidgetButton with text PREVRender your own PREV button
widthPrevBtndouble1/4 screen widthWidth of view wrapper PREV button
namePrevBtnString"PREV"Change PREV to any text you want
styleNamePrevBtnTextStyleWhite colorStyle for text at PREV button
colorPrevBtnColortransparentColor for PREV button
highlightColorPrevBtnColorColor(0x4dffffff)Color for PREV button when press
isShowPrevBtnboolfalseShow or hide PREV button
borderRadiusPrevBtndouble30.0Rounded PREV button
<b>Done Button</b>
renderDoneBtnWidgetButton with text DONERender your own DONE button
widthDoneBtndouble1/4 screen widthWidth of view wrapper DONE button
onDonePressFunctionGo to last pageFire 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
<b>Next Button (other attributes will have the same Done btn)</b>
renderNextBtnWidgetButton with text NEXTRender your own NEXT button
nameNextBtnString"NEXT"Change NEXT to any text you want
<b>Dot Indicator</b>
isShowDotIndicatorbooltrueShow or hide dot indicator
colorDotColorColor(0x80000000)Color for dot when passive
colorActiveDotColorColor(0xffffffff)Color for dot when active
sizeDotdouble8.0Size of each dot
<b>Locale</b>
localeString'en''en' or 'ar' to set the default locale and adjust the direction of widgets
<b>Status bar</b>
shouldHideStatusBarboolfalseShow or hide the status bar
<b>Behavior</b>
isScrollablebooltrueForce button-only scrolling

Pull request and feedback are always appreciated #

1.2.0 #

  • Add PREV button and optimize code

1.1.9 #

  • Add default go to last page at onSkipPress

1.1.8 #

  • Add configuration able to scroll

1.1.7 #

  • Fix content scroll overlain bottom view
  • Add set width of done, next button

1.1.6 #

  • Add option show or hide the status bar
  • Adding locale feature, adjust bottom navigation

1.1.5 #

  • Fix margin not a type of double

1.1.4 #

  • Format code

1.1.3 #

  • Add background image

1.1.2 #

  • Add custom center widget

1.1.1 #

  • Update docs and remove redundant attributes at slide

1.1.0 #

  • Add set max number of lines at title

1.0.9 #

  • Fix navigate example

1.0.8 #

  • Change color options to be instances of Color instead int

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

Use this package as a library

1. Depend on it

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


dependencies:
  intro_slider: ^1.2.0

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.2.0 Mar 31, 2019 Go to the documentation of intro_slider 1.2.0 Download intro_slider 1.2.0 archive
1.1.9 Mar 20, 2019 Go to the documentation of intro_slider 1.1.9 Download intro_slider 1.1.9 archive
1.1.8 Mar 12, 2019 Go to the documentation of intro_slider 1.1.8 Download intro_slider 1.1.8 archive
1.1.7 Mar 7, 2019 Go to the documentation of intro_slider 1.1.7 Download intro_slider 1.1.7 archive
1.1.6 Mar 5, 2019 Go to the documentation of intro_slider 1.1.6 Download intro_slider 1.1.6 archive
1.1.5 Feb 18, 2019 Go to the documentation of intro_slider 1.1.5 Download intro_slider 1.1.5 archive
1.1.4 Jan 20, 2019 Go to the documentation of intro_slider 1.1.4 Download intro_slider 1.1.4 archive
1.1.3 Jan 20, 2019 Go to the documentation of intro_slider 1.1.3 Download intro_slider 1.1.3 archive
1.1.2 Jan 7, 2019 Go to the documentation of intro_slider 1.1.2 Download intro_slider 1.1.2 archive
1.1.1 Jan 5, 2019 Go to the documentation of intro_slider 1.1.1 Download intro_slider 1.1.1 archive

All 22 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
95
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]
97
Learn more about scoring.

We analyzed this package on Apr 24, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

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
flutter_localizations 0.0.0
Transitive dependencies
collection 1.14.11
intl 0.15.8
meta 1.1.6 1.1.7
path 1.6.2
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8