finite_coverflow 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

finite_coverflow #

Coverflow slider in flutter which helps you to create amazing slider, carousel and walkthrough sliders.

    

Getting Started #

Simple Crousel Example #

You can create simple crousel into your app by the following:

    FinitePager(
      scrollDirection: Axis.horizontal, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

Rotational Crousel Example #

You can create rotational crousel into your app by adding rotation attribute in FinitePager:

    FinitePager(
      rotationY: 60, // Unselected item rotation value
      scrollDirection: Axis.horizontal, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

Scaled item Crousel Example #

You can create Scaled item crousel into your project by adding or changing the attribute value of scaleX and scaleY, just like this:

    FinitePager(
      scaleX: 0.8, // Minimum scaleX value 
      scaleY: 0.4, // Minimum scaleY value 
      scrollDirection: Axis.horizontal, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

Opacity Crousel Example #

You can create opacity crousel into your app by adding minimum opacity attribute value, just like this:

    FinitePager(
      opacity: 0.4, // Minimum opacity value for the items
      scrollDirection: Axis.horizontal, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

Stack Slider Example #

You can create Stack Slider into your app by changing the type of FinitePager to PagerType.stack:

    FinitePager(
      pagerType: PagerType.stack, // Change the FinitePager behavior to stack slider
      scrollDirection: Axis.vertical, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

OverScroll Stack Slider Example #

You can create Overflow Stack Slider into your app by adding type to PagerType.stack and change overscroll value.
***Note : overscroll is only applicable on PagerType.Stack ***

    FinitePager(
      overscroll: -300, // Over Scroll value when user slide in or slide off
      pagerType: PagerType.stack, // PagerType by default set to carousel
      scrollDirection: Axis.horizontal, // Scroll direction for pager
      children: <Widget>[ // Add your child here
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    )

Here is the result for this example

Finite Coverflow attribute list #

Here is the detail of all attributes

Attribute NameDescriptionApplicable Type
pagerTypeSet the FinitePager type i.e. PagerType.Carousel & PagerType.Stack-
reverseMake reverse order if is set to trueBoth
scrollDirectionScrollDirection of your pager i.e. Axis.Horizontal & Axis.VerticalBoth
viewPortFractionSet the view port FractionCarousel
pageSnappingFor snapped your selected or current pageBoth
physicsIt hold ScrollPhysics effects scrolling velocity etc.Both
onPageChangedReturn callback and send back current index whenever selectedBoth
scaleXMinimum x-scale of unselected pageBoth
scaleYMinimum y-scale of unselected pageBoth
opacityset Opacity of unselected pageBoth
rotationXMaximum x-rotation of unselected pageCarousel
rotationYMaximum y-rotation of unselected pageCarousel
overscrollMake the last item overscrolled effectStack
keyGet key and set in pagerBoth
childrenget list of widget and add into pager item

MIT License #

Copyright (c) 2020 Muhammad Saeed Younus

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[0.0.1] - 2020-02-21. #

  • Coverflow slider in flutter which helps you to create amazing slider, carousel and walkthrough sliders.

[1.0.0] - 2020-02-21. #

  • Minor improvement.

example/lib/main.dart

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

void main() => runApp(EntryWidget());

class EntryWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Finite Coverflow Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        brightness: Brightness.dark,
      ),
      home: MyApp(),
    );
  }
}

class MyApp extends StatefulWidget {
  // This widget is the root of your application.
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: ListView(
          children: <Widget>[
            ListTile(
              title: Text("Simple Crousel"),
              onTap: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: SizedBox(
                          height: 250,
                          child: getSimpleCrousel(),
                        ),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Reverse Crousel"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: SizedBox(
                          height: 250,
                          child: getReverseCrousel(),
                        ),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Item Rotation Crousel"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: SizedBox(
                          height: 250,
                          child: getRotationalCrousel(),
                        ),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Item Variable Scale Crousel"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: SizedBox(
                          height: 250,
                          child: getVariableScaleCrousel(),
                        ),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Item Opacity Control Crousel"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: SizedBox(
                          height: 250,
                          child: getOpacityCrousel(),
                        ),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Simple Stack Slider"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: Center(
                        child: getStackSlider(),
                      ),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Reverse Stack Slider"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: getReverseStackSlider(),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("OverScroll Stack Slider"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    home: Scaffold(
                      body: getOverScrollStackSlider(),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("Gallery Slider"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    theme: ThemeData.dark(),
                    home: Scaffold(
                      body: getGallerySlider(),
                    ),
                  );
                }));
              },
            ),
            ListTile(
              title: Text("WalkThrough Slider"),
              onTap: () {
                Navigator.of(context)
                    .push(MaterialPageRoute(builder: (context) {
                  return MaterialApp(
                    theme: ThemeData.light(),
                    home: Scaffold(
                      body: WalkThroughSliderExample(),
                    ),
                  );
                }));
              },
            ),
          ],
        ),
      ),
    );
  }

  Widget getPage(int index, double position) {
    return Card(
      child: Center(
        child: Text("$index"),
      ),
    );
  }

  Widget getSimpleCrousel() {
    return FinitePager(
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    );
  }

  Widget getReverseCrousel() {
    return FinitePager(
      reverse: true,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    );
  }

  Widget getRotationalCrousel() {
    return FinitePager(
      rotationY: 60,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    );
  }

  Widget getVariableScaleCrousel() {
    return FinitePager(
      scaleX: 0.8,
      scaleY: 0.4,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_1.jpg",
                height: 200,
              ),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_2.jpg",
                height: 200,
              ),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_3.jpg",
                height: 200,
              ),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_4.jpg",
                height: 200,
              ),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_1.jpg",
                height: 200,
              ),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              child: Image.asset(
                "images/watch_2.jpg",
                height: 200,
              ),
            ),
          ),
        ),
      ],
    );
  }

  Widget getOpacityCrousel() {
    return FinitePager(
      opacity: 0.4,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Container(
          color: Colors.deepPurple,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.red,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.yellow,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_3.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.lightBlue,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_4.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.green,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_1.jpg"),
            ),
          ),
        ),
        Container(
          color: Colors.orange,
          child: Center(
            child: Card(
              shape: CircleBorder(),
              child: Image.asset("images/watch_2.jpg"),
            ),
          ),
        ),
      ],
    );
  }

  Widget getStackSlider() {
    return FinitePager(
      pagerType: PagerType.stack,
      scrollDirection: Axis.vertical,
      children: <Widget>[
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building2.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building3.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building4.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building5.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
      ],
    );
  }

  Widget getReverseStackSlider() {
    return FinitePager(
      reverse: true,
      pagerType: PagerType.stack,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building2.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building3.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building4.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building5.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
      ],
    );
  }

  Widget getOverScrollStackSlider() {
    return FinitePager(
      overscroll: -300,
      pagerType: PagerType.stack,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building2.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building3.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building4.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building5.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
      ],
    );
  }

  Widget getGallerySlider() {
    return FinitePager(
      opacity: 0.2,
      scaleX: 0.5,
      scaleY: 0.5,
      overscroll: 0,
      reverse: true,
      pagerType: PagerType.stack,
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building2.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building3.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building4.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building5.jpg",
            fit: BoxFit.cover,
          ),
        ),
        Card(
          child: Image.asset(
            "images/building1.jpg",
            fit: BoxFit.cover,
          ),
        ),
      ],
    );
  }

}

class WalkThroughSliderExample extends StatefulWidget {
  @override
  _WalkThroughSliderExampleState createState() =>
      _WalkThroughSliderExampleState();
}

class _WalkThroughSliderExampleState extends State<WalkThroughSliderExample> {
  int selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: FinitePager(
            pagerType: PagerType.stack,
            overscroll: -200,
            opacity: 0.2,
            scrollDirection: Axis.horizontal,
            onPageChanged: (index) {
              setState(() {
                selectedIndex = index;
              });
            },
            children: <Widget>[
              Container(
                child: Image.asset(
                  "images/building1.jpg",
                  fit: BoxFit.cover,
                ),
              ),
              Container(
                child: Image.asset(
                  "images/building2.jpg",
                  fit: BoxFit.cover,
                ),
              ),
              Container(
                child: Image.asset(
                  "images/building3.jpg",
                  fit: BoxFit.cover,
                ),
              ),
              Container(
                child: Image.asset(
                  "images/building4.jpg",
                  fit: BoxFit.cover,
                ),
              ),
              Container(
                child: Image.asset(
                  "images/building5.jpg",
                  fit: BoxFit.cover,
                ),
              ),
              Container(
                child: Image.asset(
                  "images/building1.jpg",
                  fit: BoxFit.cover,
                ),
              ),
            ],
          ),
        ),
        Container(
          height: 100,
          child: Text(
            "Page ${selectedIndex + 1}",
            style: Theme
                .of(context)
                .textTheme
                .display3
                .copyWith(
              color: Colors.black,
            ),
          ),
        ),
      ],
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  finite_coverflow: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:finite_coverflow/finite_coverflow.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
21
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]
61
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test