flutter_slide_done 0.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 63

flutter_slide_done #

License Awesome Flutter Pub

English | 中文

SlideDone的灵感来源于滑动解锁,可以将它定义为滑动开关,可以单向也可以双向。你可以自定义SlideDone的参数,让它变成你想要的样子。

特点功能: #

  • 支持滑动触发事件
  • 支持主动触发事件
  • 支持自定义样式
  • 支持单向与双向,初始化默认位置

Demo #

下载 APK-Demo

项目演示 #

Example
main.dart

简单用例 #

1.在 pubspec.yaml 中添加依赖 #

//pub方式
dependencies:
  flutter_slide_done: ^0.0.1

//导入方式
dependencies:
  flutter_slide_done:
    path: 项目路径

2.在布局文件中添加 SlideDone #

import 'package:flutter_slide_done/slide_done.dart';
....
  GlobalKey<SlideDoneState> slideDoneKey = new GlobalKey<SlideDoneState>();
....
  SlideDone(
    key: slideDoneKey,
    onStart: () async {
      await Future.delayed(Duration(seconds: 2), (){});
    },
    onEnd: () async {
      await Future.delayed(Duration(seconds: 2), (){});
    },
  ),

3.触发动作 #

  // 如果不需要可以不用设置SlideDone的key
  slideDoneKey.currentState.callOnStart();
  slideDoneKey.currentState.callOnEnd();

捐赠 #

如果你喜欢我的项目,请在项目右上角 "Star" 一下。你的支持是我最大的鼓励! ^_^ 你也还可以扫描下面的二维码,或者通过Donate to this project using Paypal,对作者进行打赏。

如果在捐赠留言中备注名称,将会被记录到列表中~ 如果你也是github开源作者,捐赠时可以留下github项目地址或者个人主页地址,链接将会被添加到列表中起到互相推广的作用
捐赠列表

QQ讨论群 - 554981921 #

进群须知 #

这个群不仅仅是解决SlideDone的问题,任何Flutter相关的问题都可以进行讨论。正如它的名字一样,有问必答,只要群主有时间,都会帮大家一起解决问题。

开源协议 #

 
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.

 

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/README.md

example #

A new Flutter application.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_slide_done: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_slide_done/generated/i18n.dart';
import 'package:flutter_slide_done/slide_done.dart';
  
Version Uploaded Documentation Archive
0.0.1 Jan 2, 2019 Go to the documentation of flutter_slide_done 0.0.1 Download flutter_slide_done 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
63
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.17
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/slide_done.dart. (-1.99 points)

Analysis of lib/src/slide_done.dart reported 4 hints:

line 4 col 9: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 5 col 9: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 241 col 7: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 269 col 7: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Format lib/slide_done.dart.

Run flutter format to format lib/slide_done.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test