Search packages, repositories and app categories

lite_rolling_switch cover
Package detailsv1.0.1

lite_rolling_switch

Custom Switch button with nice looking and attractive animation, made to allow you to customize colors, icons and other cosmetic content. Now supports null safety.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
756
Likes
286
Pub points
130

Install package

flutter pub add lite_rolling_switch

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Lite Rolling Switch is a customizable Flutter switch widget featuring smooth, visually appealing animations. It allows developers to tailor colors, icons, and other visual elements to match their app's design. Fully compatible with null safety, it supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. The package is lightweight and easy to integrate, making it ideal for apps requiring an engaging toggle interface without heavy overhead.

Use cases

  • Custom toggle switches in forms
  • Interactive settings panels
  • Animated UI elements in dashboards
  • User preference toggles
  • Visual feedback in mobile and web apps

Key features

  • Smooth rolling animation
  • Customizable colors and icons
  • Null safety support
  • Cross-platform compatibility
  • Lightweight and performant
  • Easy integration with Flutter

Suitable for

  • Developers seeking animated switches
  • Design-focused applications
  • Apps needing interactive toggles
  • Flutter beginners exploring widgets
  • Projects targeting multiple platforms

Considerations

  • Limited to cosmetic customization
  • No built-in state management
  • Not suitable for complex form logic
  • Requires manual handling of onToggle events
  • Best for simple toggle functionality only

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.