DEV Community

rajesh
rajesh

Posted on

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

Top comments (1)

Collapse
 
thomasbnt profile image
Thomas Bnt ☕

Hello ! Don't hesitate to put colors on your codeblock like this example for have to have a better understanding of your code 😎

console.log('Hello world!');
Enter fullscreen mode Exit fullscreen mode

Example of how to add colors and syntax in codeblocks