FLUTTER ECOSYSTEM

toggle_switch

Toggle Switch - A simple toggle switch widget. It can be fully customized with desired icons, width, colors, text, corner radius etc. It also maintains selection state.

toggle_switch cover
Latest version
2.3.0
30-day downloads
337K
Likes
1.6K
Pub points
160

Package Overview

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

Overview

A customizable toggle switch widget for Flutter that supports full customization of appearance and behavior. Users can adjust width, colors, icons, text, corner radius, and more. It maintains selection state across rebuilds and is suitable for various UI needs requiring on/off toggling. The package is lightweight and compatible with all major platforms including mobile, web, and desktop.

Use cases
  • User preference settings
  • On/off feature toggles
  • Form input controls
  • Dark mode switches
  • Profile configuration panels
Key features
  • Fully customizable design
  • Maintains selection state
  • Supports icons and text
  • Cross-platform compatibility
  • Adjustable size and styling
  • Simple API integration
Suitable for
  • Developers building responsive UIs
  • Apps needing toggle-based inputs
  • Customizable form components
  • Multi-platform Flutter projects
Considerations
  • Requires manual handling of state in some cases
  • Limited built-in animations
  • Best suited for simple toggle logic
  • Not ideal for complex interactive widgets
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add toggle_switch

Categories

Source repository

Related projects

Rankings