pressable

Creator: coderz1093

Last updated:

0 purchases

pressable Image
pressable Images
Add to Cart

Description:

pressable

Pressable #
Quickly add tap effects to your widgets.
Work in progress. Widgets may change at any time.
Usage #
Pressable.opacity(
onPressed: () {
print('Opacity pressed');
},
child: const ExampleButton(title: 'Opacity'),
)
copied to clipboard
Supported effects:

Ripple (InkWell)
Scale
Opacity
Fill
Custom builder

Default Theme #
You can use DefaultPressableTheme InheritedWidget to provide default PressableTheme to its
Widget subtree.
DefaultPressableTheme(
fillTheme: PressableFillTheme(
fillColor: Colors.green.withOpacity(0.2),
),
child: Pressable.fill(
onPressed: () {},
child: const ExampleButton(title: 'Default theme'),
),
),
copied to clipboard
Platform-specific Pressable Theme #
To specify theme for each platform use Pressable.platform() constructor.
Pressable.platform(
onPressed: () {},
ios: const PressableTheme.opacity(),
android: const PressableTheme.ripple(),
child: const ExampleButton(title: 'Platform'),
),
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.