swipable 0.1.0

swipable #

Animatable horizontal-gesture detecting container supporting event callbacks

Changelog #

[0.1.0] - September 17, 2018

  • NEW: Added onAction callback function
  • In use for long enough for first release

[0.0.4] - August 10, 2018

  • BUGFIX: Resolved incorrect event handler behavior
  • IMPROVEMENT: Fixed errors in example app

[0.0.3] - August 09, 2018

  • IMPROVEMENT: Reordered CHANGELOG.md in descending order
  • IMPROVEMENT: Degraded required Flutter SDK version from 1.19.0 to 0.5.7 to fix dartdoc issues on Dart Pub

[0.0.2] - August 09, 2018

  • BUFGIX: Fixed breaking error in /lib/src/Swipable.dart
  • NEW: Added example app
  • NEW: Added basic tests for SwipableInfo

[0.0.1] - August 09, 2018

  • TODO: Support non-horizontal swiping
  • TODO: Improved documentation


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

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

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Swipable Test',
      home: new MyHomePage(title: 'Swipable Test'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => new _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  int _count = 0;

  bool onFling(SwipableInfo swipe, DragEndDetails event) {
    setState(() {
    return true;

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        centerTitle: true,
        title: new Text(widget.title),
      body: new Container(
          child: new Swipable(
        onFling: onFling,
        tweenTranslation: (swipe) => Offset(2.0 * swipe.fractionalDelta, 0.0),
        child: new Card(
          child: new Center(child: new Text('Swipes: $_count')),

Use this package as a library

1. Depend on it

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

  swipable: ^0.1.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:swipable/swipable.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 Feb 18, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/swipable.dart.

Run flutter format to format lib/swipable.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/a-gu/flutter-swipable was unreachable.

Package is getting outdated. (-41.92 points)

The package was last published 74 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.63.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