搜索插件、代码仓与 APP 分类

GitHub 代码仓cgustav/lite_rolling_switch

lite_rolling_switch

基于Pedro Massango的'crazy-switch'组件的全自定义滚动开关小部件 https://github.com/pedromassango/crazy-switch

lite_rolling_switch 项目封面
星标
55
复刻
56
最近推送(UTC)
2024年6月25日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

lite_rolling_switch

Full customable rolling switch widget for flutter apps based on Pedro Massango's 'crazy-switch' widget https://github.com/pedromassango/crazy-switch

About

Custom Switch button with attractive animation, made to allow you to customize colors, icons and other cosmetic content. Manage the widget states in the same way you do with the classical material's switch widget.

NOTE: Currently, you cannot directly change the widget height properties. This feature will be available soon.

Previews

Image preview

Image preview 2

Basic Implementation

import 'package:lite_rolling_switch/lite_rolling_switch.dart';

LiteRollingSwitch(
    //initial value
    value: true,
    textOn: 'disponible',
    textOff: 'ocupado',
    colorOn: Colors.greenAccent[700],
    colorOff: Colors.redAccent[700],
    iconOn: Icons.done,
    iconOff: Icons.remove_circle_outline,
    textSize: 16.0,
    onChanged: (bool state) {
      //Use it to manage the different states
      print('Current State of SWITCH IS: $state');
    },
),

Tests

To executed included unit tests run flutter test. Feel free to Pull Request your own Unit Test to improve this package!

Changelog

Visit the complete changelog here.

Contributors

Other collaborators

License

This project has been published under an MIT license, you can consult the license terms in detail here.

Other

Eduardo Muñoz GitHub avatar
GitHub 作者

Eduardo Muñoz ↗

Software developer 🥷

Chile
语言Dart

此仓库发布的插件

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • intl^0.18.0
  • flutter_test开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗