A Swipe to Confirm Button for Flutter

A Swipe to Confirm Button for Flutter

Sliding Button .A sliding Flutter widget, based on the slide to unlock function from multiple devices. Heavily customizable and flexible.

Sliding Button

A sliding Flutter widget, based on the slide to unlock function from multiple devices. Heavily customizable and flexible.

pls don't be a giant-ass gif

Installing

Add the following to your pubspec.yaml:

dependencies:
slide_button: ^0.2.8

Usage

  1. Install
  2. Use the SlideButton widget anywhere
  3. ???
  4. Profit

Properties

Several properties are present and can be customized:

| Properties                  | Description                                                                                                                                                                |
|-------------------------    |------------------------------------------------------------------------------------------------------------------------------------------------------------------------    |
| height                      | Height of the Widget, leave blank to get the parent constraints.                                                                                                           |
| backgroundChild             | A child to be put on the background bar, NOT centered by default.                                                                                                          |
| slidingChild                | A child tobe put on the sliding bar, NOT centered by default.                                                                                                              |
| backgroundColor             | The color of the background bar.                                                                                                                                           |
| slidingBarColor             | The color of the sliding bar.                                                                                                                                              |
| confirmPercentage           | How much of the bar width have to be slided to confirm the action.                                                                                                         |
| initialSliderPercentage     | The initial (and resting) percentage of the sliding bar.                                                                                                                   |
| isDraggable                 | Is this widget draggable?                                                                                                                                                  |
| onButtonSlide               | Callback that returns a `Double` value containing the drag percentage.                                                                                                     |
| onButtonOpened              | Callback called when the button is slided all the way.                                                                                                                     |
| onButtonClosed              | Callback called when the button is back to the initialSliderPercentage.                                                                                                    |
| slideDirection              | Either SlideDirection.RIGHT or SlideDirection.LEFT, sets the sliding direction of the sliding bar.                                                                         |
| shouldCloseBorders          | This updates the borders when the button reaches 0.9 percent dragged, and set the borderRadius to zero, giving the impression of a "closed" button. Defaults to `true`     |
| shouldCloseBorders          | BorderRadius for the sliding bar, default is 50\.                                                                                                                             |

TODO

  • Create the repo
  • Make it work
  • Fix text on the sliding bar
  • Find a better activation function capable of activating between x and y percentages
  • More listeners?
  • Parallax effect?
  • Make it pop

Inspiration

This widget was partially made possible by inspecting elements from sliding_up_panel.

Download Details:

Author: Timoteohss

GitHub: https://github.com/Timoteohss/slide_button

flutter dart mobile-app

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

How much does it cost to make a Flutter app for your business?

Get a Free Quote on Android App Development, iPhone App Development, Ionic App Development, Video Development, ASO, SEO, Google Ads/Adwords, SEO for your app Idea.