swipable 0.1.0

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

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

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  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;

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

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

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

  @override
  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:


dependencies:
  swipable: ^0.1.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:swipable/swipable.dart';
  
Version Uploaded Documentation Archive
0.1.0 Sep 17, 2018 Go to the documentation of swipable 0.1.0 Download swipable 0.1.0 archive
0.0.4 Aug 10, 2018 Go to the documentation of swipable 0.0.4 Download swipable 0.0.4 archive
0.0.3 Aug 10, 2018 Go to the documentation of swipable 0.0.3 Download swipable 0.0.3 archive
0.0.2 Aug 10, 2018 Go to the documentation of swipable 0.0.2 Download swipable 0.0.2 archive
0.0.1 Aug 10, 2018 Go to the documentation of swipable 0.0.1 Download swipable 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
62
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]
81
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

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
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test