All Projects → Purvik → SwipeTo

Purvik / SwipeTo

Licence: MIT License
SwipeTo is a wrapper for a chat view widget which can be used initiate callback when user horizontally swipe on it.

Programming Languages

C++
36643 projects - #6 most used programming language
dart
5743 projects
CMake
9771 projects
HTML
75241 projects
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to SwipeTo

Hactoberfest-accepted
Raise Genuine PRs only. Your PRs will be accepted, keep patience.
Stars: ✭ 116 (+58.9%)
Mutual labels:  hactoberfest
fasthtmx
FastAPI-HTMX Demo Project
Stars: ✭ 62 (-15.07%)
Mutual labels:  hactoberfest
Healthify
Healthify - An app to track your daily water intake and sleep and boost your work efficiency. Healthify is built using Kotlin and follows all modern android Development practices and hence is a good learning resource for beginners
Stars: ✭ 37 (-49.32%)
Mutual labels:  hactoberfest
fmiopendata
Python interface for FMI open data
Stars: ✭ 35 (-52.05%)
Mutual labels:  hactoberfest
bigint
bigint is a C++ library which can handle Very very Big Integers. It can calculate factorial of 1000000... it can go any big. It may be useful in Competitive Coding and Scientific Calculations which deals with very very large Integers. It can also be used in Decryption process. It has many inbuilt functions which can be very useful.
Stars: ✭ 34 (-53.42%)
Mutual labels:  hactoberfest
dobby
dobby is free and will serve your orders
Stars: ✭ 24 (-67.12%)
Mutual labels:  hactoberfest
CovidVaccineNotifier
Get notified with available vaccination centres via SMS
Stars: ✭ 21 (-71.23%)
Mutual labels:  hactoberfest
elevate-lab-website
A website to inform and invite contributors to elevate-lab
Stars: ✭ 15 (-79.45%)
Mutual labels:  hactoberfest
Datscan
DatScan is an initiative to build an open-source CMS that will have the capability to solve any problem using data Analysis just with the help of various modules and a vast standardized module library
Stars: ✭ 13 (-82.19%)
Mutual labels:  hactoberfest
Web-Development-Path-And-Resources
Will Add a path and some resources in this repo for web D for my first year students
Stars: ✭ 46 (-36.99%)
Mutual labels:  hactoberfest
kubernetes
my yaml files for kubernetes cluster
Stars: ✭ 98 (+34.25%)
Mutual labels:  hactoberfest
hugo-toha.github.io
An example hugo static site with Toha theme.
Stars: ✭ 59 (-19.18%)
Mutual labels:  hactoberfest
wink-statistics
Fast & numerically stable statistical analysis
Stars: ✭ 36 (-50.68%)
Mutual labels:  hactoberfest
open-source-DSA-code
open source contribution during hacktoberfest for beginners.
Stars: ✭ 31 (-57.53%)
Mutual labels:  hactoberfest
Algorithms
🎓 Important Algorithms and their implementations
Stars: ✭ 30 (-58.9%)
Mutual labels:  hactoberfest
Hacktoberfest-2021
beginner-friendly project to help you in open-source contributions. Made specifically for contributions in HACKTOBERFEST 2021! Hello World Programs in any language and C and Cpp program , Please leave a star ⭐ to support this project! ✨
Stars: ✭ 33 (-54.79%)
Mutual labels:  hactoberfest
blurz
Blurz - Bluetooth lib for Rust using blueZ/dbus
Stars: ✭ 67 (-8.22%)
Mutual labels:  hactoberfest
Nodejs-Boilerplate
Nodejs boilerplate / framework
Stars: ✭ 15 (-79.45%)
Mutual labels:  hactoberfest
zen archived
TLS integration and more!
Stars: ✭ 133 (+82.19%)
Mutual labels:  hactoberfest
Google-Ml-Kit-plugin
A flutter plugin that implements google's standalone ml kit
Stars: ✭ 241 (+230.14%)
Mutual labels:  hactoberfest

swipe_to

SwipeTo is a wrapper for a chat view widget which can be used initiate callback when user horizontally swipe on it.

Getting Started

To use this packages, you just simply need to wrap your child component in SwipeTo widget and pass a VoidCallback that you can carry forward with your task.

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  swipe_to: 1.0.2

In your library add the following import:

import 'package:swipe_to/swipe_to.dart';

Parameter Info

  • child : (@required) StateLess or StateFull flutter widget.
  • onRightSwipe : callback which will be initiated at the end of right swipe animation. If not passed right swipe will be disabled
  • onLeftSwipe : callback which will be initiated at the end of left swipe animation. If not passed left swipe will be disabled
  • iconOnRightSwipe : IconData that will be displayed on left beneath child widget when swiped right. If not specified default is Icons.reply
  • rightSwipeWidget : Widget that will be displayed beneath child widget when swipe right. If iconOnRightSwipe is defined this will have no effect.
  • iconOnLeftSwipe : IconData that will be displayed on right beneath child widget when swiped left. If not specified default is Icons.reply
  • leftSwipeWidget : Widget that will be displayed beneath child widget when swipe left. If iconOnLeftSwipe is defined this will have no effect.
  • iconSize : Double value defining size of displayed icon beneath child widget. If not specified default it will take 26
  • iconColor : Color value defining color of displayed icon beneath child widget. If not specified primaryColor from theme will be taken
  • offsetDx : Double dx value used in Offset() till which position of child widget will get animated. If not specified 0.3 default will be taken. onRightSwipe +dx value will be used and for onLeftSwipe -dx value will be used
  • animationDuration : Duration value to define animation duration. If not specified default is 150 milliseconds

Major changes onwards [ver 0.0.1+5]

  • For a single child widget, we can now enable swipe for both left and right direction
  • swipeDirection parameter is removed. Now onLeftSwipe and onRightSwipe callback will enable swiping for a particular direction if passed
  • iconData is now split into two parameter, iconOnRightSwipe & iconOnLeftSwipe for future use
  • endOffset is now change to accept a double value only
  • callBack is now split into two parameter, onLeftSwipe & onRightSwipe

Deprecated/Removed Parameters

  • swipeDirection : Enum value from [swipeToLeft, swipeToRight] only. Make sure to pass relative Offset value according to passed swipeDirection value. If not specified swipeToRight will be taken as default.
  • iconData : IconData that will be displayed beneath child widget. if not specified default is Icons.reply
  • endOffset : Offset value till which position of child widget will get animated. if not specified Offset(0.3, 0.0) default will be taken
  • callBack : (@required) callback which will be initiated at the end of swipe animation

Example : SwipeToRight Wrap your desired widget with SwipeTo & pass a call to onRightSwipe parameter.

SwipeTo(
    child: Container(
        padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
        child: Text('Hey You! Swipe me right 👉🏿'),
    ),
    onRightSwipe: () {
        print('Callback from Swipe To Right');
    },
),

Example : SwipeToLeft Wrap your desired widget with SwipeTo & pass a call to onLeftSwipe parameter.

SwipeTo(
    child: Container(
        padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
        child: Text('👈🏿 Hey You! Swipe me Left'),
    ),
    onLeftSwipe: () {
        print('Callback from Swipe To Left');
    },
),

Example : SwipeToLeft & SwipeToRight Wrap your desired widget with SwipeTo & pass a call to onLeftSwipe & onRightSwipe parameters.

SwipeTo(
    child: Container(
        padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
        child: Text('👈🏿 Swipe me Left | YOU |Swipe me right 👉🏿'),
    ),
    onLeftSwipe: () {
        print('Callback from Swipe To Left');
    },
    onRightSwipe: () {
        print('Callback from Swipe To Right');
    },
),

Sample Outputs

References to learn

https://medium.com/@purvik1239/enable-swiping-right-left-for-your-flutter-application-widgets-a7b556674f9c

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].