touchable_opacity
1.2.0, released 6 years ago by an unverified publisher
A widget that animates the opacity of its child on touch events, similar to React Native.
What it does
Provides a TouchableOpacity widget that wraps a GestureDetector and animates the opacity of the child when touch events occur. It allows configuring properties like activeOpacity to customize the visual feedback.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want React Native-style opacity feedback on touch interactions.
- You need a simple wrapper widget to add visual feedback to touchable items.
Skip it when
- You need standard Material ink splash or ripple effects instead of opacity changes.
Strengths
- Easy to drop in and use similarly to other Flutter widgets.
- Supports customizable active opacity values.
- Maintains standard GestureDetector behaviors and interactions.
Weaknesses
- Fills its parent by default, requiring a layout widget to bound its size to its child.
- Not documented with any advanced features beyond basic opacity animation.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Container(
child: TouchableOpacity(
activeOpacity: 0.4,
child: FlutterLogo(),
),
),Alternatives
Packages that do the same job and could replace touchable_opacity.
- feedback
Widget to collect annotated screenshots and text feedback from users
84Compare - dotted_border
A flutter package to easily add dotted borders around widgets.
63Compare - focus_on_it
Get notified when a Flutter widget is focused or unfocused and react to it.
50Compare - slide_to_confirm
A slider that triggers a callback when slid to 100%.
50Compare