0 purchases
slide done nully
flutter_slide_done with null safety #
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.
Features: #
Support for sliding trigger events
Support for active trigger events
Support for custom styles
Support one-way and two-way, initialize the default location
Demo #
Download APK-Demo
Project demonstration #
Example
main.dart
Simple use case #
1.Add a dependency in pubspec.yaml
//github way
dependencies:
slide_done_nully:
git:
url: https://github.com/ulisseshen/flutter_slide_done_nullsafety.git
ref: master
// package way
dependencies:
slide_done_nully: ^0.0.2
//donĀ“t forget to run
flutter pub get
copied to clipboard
2.Add SlideDone to the layout file
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), (){});
},
),
copied to clipboard
3.Trigger action
// If you don't need it, you don't need to set the key for SlideDone.
slideDoneKey.currentState.callOnStart();
slideDoneKey.currentState.callOnEnd();
copied to clipboard
4.Add custom icons
SlideDoneNS(
key: slideDoneKey,
startIcon: Icon(Icons.keyboard_arrow_right),
endIcon:Icon(Icons.keyboard_arrow_left),
startedIcon: Icon(Icons.done),
endedIcon: Icon(Icons.done)
),
copied to clipboard
Donation #
If you like this project, please in the upper right corner of the project "Star". Your support is my biggest encouragement! ^_^
You can also donate:
Open source licenses #
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.
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.