swipe_stack 1.0.0

  • Readme
  • Changelog
  • Installing
  • 87

swipe_stack #

Swipe stack flutter.

Screenshot #

Youtube Video

Installation #


swipe_stack : ^latest_version

to your pubspec.yaml.

Usage #

maxAngle35Maximum rotation value. Must be int between 0 and 360
threshold30Manual swipe is canceled when the card is dragged less than threshold. Must be int between 1 and 100
stackFromStackFrom.NoneStack type. Must be one of StackFrom.Left, StackFrom.Right, StackFrom.Top, StackFrom.Bottom, StackFrom.None
visibleCount2Number of objects to display. Must int and at least 2
translationInterval0Distance between objects. Must be positive integer
scaleInterval0Decreasing scale value. Must be positive double
animationDurationDuration(milliseconds: 200)Animation duration
historyCount1Number of objects to keep in the history. Must be positive integer
paddingEdgeInsets.symmetric(vertical: 20, horizontal: 25)Main container padding
    children: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((int index) {
        return SwiperItem(
            builder: (SwiperPosition position, double progress) {
                return Material(
                    elevation: 4,
                    borderRadius: BorderRadius.all(Radius.circular(6)),
                    child: Container(
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.all(Radius.circular(6)),
                        child: Column(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: <Widget>[
                                Text("Item $index", style: TextStyle(color: Colors.black, fontSize: 20)),
                                Text("Progress $progress", style: TextStyle(color: Colors.blue, fontSize: 12)),
    visibleCount: 3,
    stackFrom: StackFrom.Top,
    translationInterval: 6,
    scaleInterval: 0.03,
    onEnd: () => debugPrint("onEnd"),
    onSwipe: (int index, SwiperPosition position) => debugPrint("onSwipe $index $position"),
    onRewind: (int index, SwiperPosition position) => debugPrint("onRewind $index $position"),

Manuel Usage #

final GlobalKey<SwipeStackState> _swipeKey = GlobalKey<SwipeStackState>();
    key: _swipeKey,

[1.0.0] - TODO: Add release date. #

Use this package as a library

1. Depend on it

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

  swipe_stack: ^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:swipe_stack/swipe_stack.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [swipe_stack] that is in a package requiring null.

Health suggestions

Format lib/swipe_stack.dart.

Run flutter format to format lib/swipe_stack.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and swipe_stack.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is getting outdated.

The package was last published 52 weeks ago.


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