Credits to xuelongqy
SlideDone is inspired by sliding unlocking, which can be defined as a slide switch that can be unidirectional or bidirectional. You can customize the parameters of SlideDone to make it look what you want.
- Support for sliding trigger events
- Support for active trigger events
- Support for custom styles
- Support one-way and two-way, initialize the default location
Example |
---|
main.dart |
//github way
dependencies:
slide_done_nully:
git:
url: https://github.com/ulisseshen/slide_done_nully.git
ref: master
// package way
dependencies:
slide_done_nully: ^0.0.2
//don´t forget to run
flutter pub get
import 'package:slide_done_nully/slide_done.dart';
....
GlobalKey<SlideDoneNSState> slideDoneKey = GlobalKey<SlideDoneNSState>();
....
SlideDoneNS(
key: slideDoneKey,
onStart: () async {
await Future.delayed(Duration(seconds: 2), (){});
},
onEnd: () async {
await Future.delayed(Duration(seconds: 2), (){});
},
),
// If you don't need it, you don't need to set the key for SlideDone.
slideDoneKey.currentState.callOnStart();
slideDoneKey.currentState.callOnEnd();
SlideDoneNS(
key: slideDoneKey,
startIcon: Icon(Icons.keyboard_arrow_right),
endIcon:Icon(Icons.keyboard_arrow_left),
startedIcon: Icon(Icons.done),
endedIcon: Icon(Icons.done)
),
If you like my project, please in the upper right corner of the project "Star". Your support is my biggest encouragement! ^_^ You can also scan the qr code below or , donation to Author.
If in donation message note name, will be record to the list if you are making open source authors, donation can leave when making project address or personal home page, a link will be added to the list have the effect of promoting each other (https://github.com/xuelongqy/donation/blob/master/DONATIONLIST.md)
The group is not only solve the problem of SlideDone, any Flutter related issues can be discussed. Just as its name, craigslist, as long as there is time, group of Lord will help you solve problems together.
MIT License
Copyright (c) 2018 xuelongqy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.