A simple slide-to-unlock widget for Flutter inspired by the Android Slide To Act.

Overview

Pub

Flutter Slide To Act

A simple slide-to-unlock widget for Flutter inspired by the Android Slide To Act.

sample gif

Getting started

Add slide_to_act to your pubspec:

dependencies:
  slide_to_act: any # or the latest version on Pub

Example

An example app showing all the features is available in this repo in the folder example.

Run the app to get an idea of the component.

Or just go to this link to see it compiled for the web https://imtoori.dev/flutter-slide-to-act/#/

Contributions

Contributions of any kind are more than welcome! Feel free to fork and improve the project in any way you want, make a pull request, or open an issue.

Comments
  • Shimmer

    Shimmer

    Would nice to use Shimmer to have the swipe indication animations. I used to use another library https://github.com/anirudhsharma392/Slider-Button, but it didn't have the customization I need, ended up implementing my own. But it does have a shimmer

    opened by pixnbit 2
  • Stack widget with 'overflow' property with latest flutter version (1.22)

    Stack widget with 'overflow' property with latest flutter version (1.22)

    Looks like the recent flutter version broke the library:

    /c:/Runtime/flutter/.pub-cache/hosted/pub.dartlang.org/slide_to_act-0.1.3/lib/slide_to_act.dart:126:25: Error: No named parameter with the name 'overflow'.
                            overflow: Overflow.clip,
                            ^^^^^^^^
    /c:/Runtime/flutter/packages/flutter/lib/src/widgets/basic.dart:3273:3: Context: Found this candidate, but the arguments don't match.
      Stack({
      ^^^^^
    
    opened by romanlytvyn 1
  • fix recent flutter version compatibility issue

    fix recent flutter version compatibility issue

    Fix the breaking change introduced by https://github.com/flutter/flutter/commit/7948a7863bd8931e4e029c5b109f26c1b3dcf8ea and merged into flutter master by https://github.com/flutter/flutter/pull/61366 by replacing overflow: Overflow.visible, with clipBehavior: Clip.none, in the Stack object instantiation.

    Fixes #1.

    opened by romanlytvyn 0
  • Bugfix: calculation of _maxDx

    Bugfix: calculation of _maxDx

    I noticed that _maxDx was calculated quite complicated and wrong if you change properties that effect the size of the sliding button.

    _maxDx = _containerWidth! -
              (sliderWidth / 2) -
              40 -
              widget.sliderButtonYOffset;
    

    There is the hardcoded "40" and I noticed that sliderButtonYOffset (that should better be named sliderButtonXOffset ;) ) was just necessary because of a hardcoded horizontalPadding of 8 around the sliding button.

    Therefore I did those changes and realized that the calculation of _maxDx becomes very simple:

    _maxDx = _containerWidth! - sliderWidth;
    
    opened by AndrewSheetMetal 0
  • Align the Main Text

    Align the Main Text

    Can anyone help/guide me how I can align the text. By default, it is automatically centered. I have some long text to display but when the text displayed then it is covered by the sliding widget.

    opened by mukundpradhan-inndata 0
  • "Null check operator used on a null value" was thrown during a scheduler callback

    Getting this sometimes, I think when I have scrolled the container that contains the slide into view and then scroll it out, but I can't reproduce it consistently.

    The following _CastError was thrown during a scheduler callback:
    Null check operator used on a null value
    
    When the exception was thrown, this was the stack: 
    #0      SlideActionState.initState.<anonymous closure> (package:slide_to_act/slide_to_act.dart:387:39)
    #1      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
    #2      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1090:9)
    #3      SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
    #7      _invoke (dart:ui/hooks.dart:161:10)
    

    Which comes from:

          final RenderBox containerBox =
              _containerKey.currentContext!.findRenderObject() as RenderBox;
    
    opened by willbryant 2
  • Getting error in the initState()

    Getting error in the initState()

    I am getting this error:

    ════════ Exception caught by scheduler library ═════════════════════════════════
    The following NoSuchMethodError was thrown during a scheduler callback:
    The method 'findRenderObject' was called on null.
    Receiver: null
    Tried calling: findRenderObject()
    
    When the exception was thrown, this was the stack
    #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
    #1      SlideToActState.initState.<anonymous closure> (package:eagl/widgets/slide_to_act.dart:372:40)
    #2      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
    #3      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1090:9)
    #4      SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:865:7)
    
    opened by shubham26794 0
Owner
Salvatore Giordano
Flutter team lead @GetStream ⛵ Born in Sicily 🏝️ Lliving in Amsterdam 🇳🇱
Salvatore Giordano
A Flutter plugin to request the device unlock screen.

device_unlock A Flutter plugin to request the device unlock screen on Android and iOS. How does it work The following attempts and fallbacks are made:

Cíngulo 19 Sep 7, 2022
Find out what you did all the days and unlock moments you completely forgot!

This project has been replaced by Relieve Quid Faciam Hodie What did I do today? Find out what you did all these days and unlock moments you completel

null 10 Oct 27, 2022
Flutter Slides utilizes Flutter Desktop Embedding to provide a simple slide presentation app

Flutter Slides Flutter Slides utilizes Flutter Desktop Embedding to provide a simple slide presentation app. Presentations are data driven from files

Tim Sneath 12 Oct 31, 2022
Sardor Makhmudov 0 Feb 7, 2022
A slide puzzle game created with flutter for the flutter hack

Jungle puzzle A slide puzzle game created with flutter for the flutter hack https://flutter.dev/events/puzzle-hack Numeric Image Dark Mode How to run?

Roger Torres 13 Oct 26, 2022
Apparence.io flutter slide puzzle challenge

Slide puzzle flutter challenge 2022 Developed with ?? by Apparence.io Gameplay This puzzle game is a bit different from other water pipes games. You c

Apparence.io 14 Apr 30, 2022
An Animated login page made with dart which is slide based

Flutter animated login page A new dart project designed for login page of a webs

Munem Sarker 1 Jan 27, 2022
Flutter page widget that is dismissed by swipe gestures, with Hero style animations, Inspired by Facebook and Instagram stories.

dismissible_page ?? ?? Creates page that is dismissed by swipe gestures, with Hero style animations, Inspired by FB, IG stories. Live Demo Contents Su

Tornike 76 Dec 22, 2022
Advanced & beautiful animations inspired by animate_do and Animate.css, every animation is a widget that contains default but customizable values 💙

animate_it An animation package inspired by animate_do and Animate.css. Since the original animate_do is not being maintained, I have decided to creat

Luke Moody 3 Oct 1, 2022
Widget to count the amount of nested widget tree, useful in the dynamic construction of the interface when it is important to know the depth of widget.

widget_tree_depth_counter Widget Tree Depth Counter WidgetTreeDepthCounter is a simple widget to count the amount of nested widget tree, useful in the

Riccardo Cucia 4 Aug 1, 2022
MindInventory 15 Sep 5, 2022
A flutter date time picker inspired by flutter-cupertino-date-picker

Flutter Datetime Picker (Pub) flutter_datetime_picker A flutter date time picker inspired by flutter-cupertino-date-picker you can choose date / time

null 0 Nov 30, 2021
Authentication + Splash Screen Flutter UI, UI created getting inspired from one share on dribble with flutter

Rest App, with Firebase Auth + SplashScreen UI created getting inspired from one share on dribble with flutter, after getting amazing responce, Added

Sanskar Tiwari 202 Dec 17, 2022
Flutter component concept created with Flutter using Dart programming language, inspired by Gooey Rab Bar.

Gooey Tab Bar Flutter Flutter component concept created with Flutter using Dart programming language, inspired by Gooey Tab Bar. About This component

Wilton Neto 216 Dec 14, 2022
🍝 restaurant menu app made with flutter inspired by this design https://goo.gl/jChLBV

Menu Flutter Todo Make background colors that changes with PageView Add custom tab indicators Change food prices Make cart animation Customize card sh

Braulio Cassule 593 Jan 1, 2023
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code ✨ Featuring

Felt 307 Dec 24, 2022
Application developed in Flutter with inspired layout in the Tinder

flutter_tinder_template This is an template implementation of the Tinder App with Flutter. How to Run the Project Ensure that you have the flutter ins

Gildson 41 Sep 21, 2021
PayPal UI Redesign Project inspired by the winner of the Uplabs Challenge made in Flutter

Paypal Redesign UI App (Challenge) This project is developed for iOS & Android, using Flutter and inspired from the winner Vadim Demenko of the Uplabs

Oğuzhan Atalay 9 Nov 26, 2022
App concept created with Flutter using Dart programming language, inspired by Groceries Shopping App Interaction.

Grocery Shop Flutter App concept created with Flutter using Dart programming language, inspired by Groceries Shopping App Interaction. About The app w

Wilton Neto 485 Dec 9, 2022