swipe_actions_new

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

swipe actions new

Swipe Actions New #
swipe_actions_new #
A widget which can be used to call functions when the wrapped child is dragged or flung. Only intended to work with horizontal swipes.
Original Library: Swipe Actions
Getting Started #
Import the package
import 'package:swipe_actions_new/swipe_actions_new.dart';
copied to clipboard
And use Swipe class, for example:
Swipe(
child: ListTile(
title: Text("Some Child"),
),
menuItems: <SwipeAction>[
SwipeAction(
icon: Icons.add,
onSelect: () {
setState(() {
_counts[i]++;
});
},
highlighColor: Colors.green,
),
SwipeAction(
icon: Icons.remove,
onSelect: () {
setState(() {
_counts[i]--;
});
},
highlighColor: Colors.red,
),
SwipeAction(
icon: Icons.open_in_new,
onSelect: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
appBar: AppBar(
title: Text("Counter $i"),
),
body: Center(
child: Text(
_counts[i].toString(),
style: TextStyle(fontSize: 100),
)),
)),
);
},
highlighColor: Colors.yellow,
)
],
)
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.