selectable_container
1.0.7, released 4 years ago by an unverified publisher
A selectable container widget that shows an icon in one of its corners when tapped.
What it does
Provides a Flutter container widget that can be toggled between selected and unselected states. When tapped, it updates its selection status and displays a customizable indicator icon on its corner.
AI-written summary of version 1.0.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a simple selectable card or container component for user selections.
- You want an easy way to display checkmarks or icons on containers when tapped.
Skip it when
- You require complex multi-select grid selection managers or advanced gesture recognizers.
- You are looking for standard Material selection controls like CheckboxListTile or Radio.
Strengths
- Easy to implement and customize with background, border, and icon position properties.
- Supports null-safety.
Weaknesses
- Limited to a single-purpose container widget.
- Lacks built-in group management for radio-like behavior out of the box.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
SelectableContainer(
selected: _selected,
onValueChanged: (newValue) {
setState(() {
_selected = newValue;
});
},
child: Text('Tap me'),
padding: 16.0,
)Alternatives
Packages that do the same job and could replace selectable_container.
- app_badge_plus
Flutter plugin to set numeric badges on app icons for iOS, Android, and macOS
84Compare - aligned_tooltip
A flexible tooltip widget that aligns to its target with automatic fallback positioning.
85Compare - country_flags
Displays country flags as SVG or emoji using ISO country, language, currency, or phone prefix codes
69Compare - iconsax_flutter
Flutter package providing a collection of Iconsax icons in multiple styles.
52Compare