dev-resources.site
for different kinds of informations.
migrate old dart code
i want to change the old dart code into new, this will follow the documentation https://github.com/letsar/flutter_slidable/wiki/FAQ the code -
children: widget.stores!.map((Store item) {
return ExpansionPanel(
headerBuilder: (BuildContext context, bool isExpanded) {
return Slidable(
endActionPane: SlidableScrollActionPane(),
secondaryActions: [
Transform.translate(
offset: Offset(-4, 0),
child: Container(
child: IconButton(
onPressed: () {
showDeleteDialog(item.products!
.map((e) => e.shoppingItemId!)
.toList());
},
i have tried but unable to solve the issue , moreover the error prompt is- 1)The method 'SlidableScrollActionPane' isn't defined for the type 'ShoppingListPage'. Try correcting the name to the name of an existing method, or defining
a method named 'SlidableScrollActionPane'. β’ undefined_method
2) The named parameter 'secondaryActions' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the
name 'secondaryActions'. β’ undefined_named_parameter
3)The named parameter 'actionExtentRatio' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the
name 'actionExtentRatio'. β’ undefined_named_parameter
Featured ones: