flutter_slidable
flutter_slidable copied to clipboard
Can't create SlidableController according to documentation
Here, the docs said
final controller = SlidableController();
// ...
Slidable(
controller: controller,
// ...
);
// ...
// Open the actions
void _handleOpen() {
controller.openEndActionPane();
// OR
//controller.openStartActionPane();
}
void _handleOpen() {
controller.close();
}
But thie SlidableController() got error
1 positional argument expected by 'SlidableController.new', but 0 found.
I have same problem.
For me work this
In definition of class: class _MyAppState extends State<OrderListPage> with SingleTickerProviderStateMixin
and late final slidableController = SlidableController(this);
Thanks, @froccawork . It worked for me.
The widget has to be a Stateful(StatefulWidget / ConsumerStatefulWidget).