I am fetching list of documents from api and every document has property actions(List of actions). Documents are displayed in a List and i want to display actions in ActionPane/SlidableAction an I get an error: "Another exception was thrown: type 'MappedListIterable<AkcijeDokument, dynamic>' is not a subtype of type 'Widget'". And error "The following _TypeError was thrown building: type 'MappedListIterable<AkcijeDokument, dynamic>' is not a subtype of type 'Widget'"...
When I print actions like this params[index].akcije.map((ak) => print(ak.nazivAkcije)) I get response: "I/flutter (25152): Potvrdi
I/flutter (25152): Odbij", "Potvrdi" and "Odbij" are the actions that i need to fetch and display in List for each document.
And here is the code where I'm trying to display the actions
params[index].akcije.map<Widget>(
(ak) => SlidableAction(
onPressed: (context) {},
icon: Icons.bookmark,
backgroundColor: Colors.red,
label: ak.nazivAkcije,
),
),,```