Skip to content
On this page

PressableFeedback

Animated feedback for a pressable child.

PressableFeedback in FluttyUIPressableFeedback in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

PressableFeedback

const PressableFeedback({
  super.key,
  this.role = MotionRole.pressableFeedback,
  required this.child,
  this.onPressed,
  this.onLongPress,
  this.enabled = true,
  this.pressedOpacity = 0.7,
  this.pressedScale = 1.0,
  this.borderRadius,
  this.cursor,
});
ParameterTypeRequiredDefault
keyKey?Nonull
roleMotionRoleNoMotionRole.pressableFeedback
childWidgetYes—
onPressedVoidCallback?Nonull
onLongPressVoidCallback?Nonull
enabledboolNotrue
pressedOpacitydoubleNo0.7
pressedScaledoubleNo1.0
borderRadiusBorderRadiusGeometry?Nonull
cursorMouseCursor?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/utilities/pressable_feedback/pressable_feedback.dart

This reference is generated from the PressableFeedback declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI