Package selection guidance compiled from public package information, community data, and project usage.
A Flutter package that seamlessly integrates Material Design ListTile with customizable, native-inspired switches for both Material and Cupertino styles. It offers a clean, elegant solution for creating toggleable list items with consistent cross-platform appearance. The widget is designed to enhance user experience by combining functionality and aesthetic appeal in a lightweight, easy-to-use component. Ideal for settings or preference screens where toggles are frequently used.
Use cases
Settings UIs
Preference panels
Toggleable list items
User profile configurations
Form controls
Key features
Customizable Material and Cupertino switches
Seamless ListTile integration
Cross-platform consistency
Lightweight and performant
Easy to implement
Styling flexibility
Suitable for
Developers building settings screens
Designers seeking native-like toggles
Apps requiring cross-platform switch components
Projects emphasizing UI polish
Considerations
Requires Flutter 3.0+
Limited to switch-specific functionality
No built-in animations beyond standard transitions
May need additional styling for complex layouts
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
ListTileSwitch
ListTileSwitch is a simple widget that combines ListTile with a switch. Offering 3 types of switch widgets:
Switch: Material Switch from Material library on Flutter SDK.
CupertinoSwitch: CupertinoSwitch from Cupertino library on Flutter SDK.
A custom switch.
Tested on Android and Web but not iOS. Theoritacially it should work on iOS devices too, since this package contains nothing but pure Dart and Flutter components.
Installation
Add dependency for package on your pubspec.yaml:
dependencies:
list_tile_switch: <latest>
Usage
Use it as a regular ListTile widget with a bonus: the trailing widget is a switch. Covering all aspects of the ListTile and adding more with a custom switch.
Parameter
Definition
double switchScale
Adjusting the scale of the switch widget.
Color switchActiveColor
The color of the switch when the switch is active.
bool toggleSelectedOnValueChange
Deciding whether to color the ListTile when switch value is true, the selected color will be the switchActiveColor.