Skip to content
pubscout

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.

WASM-ready
$ flutter pub add touchable_opacity
Source repository

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.