I have a Scaffold. On clicking the MoreActionButton, I have a showModalBottomSheet implemented that contains a list of actions.
class MyScaffold extends StatelessWidget {
final MyFruit apple;
final Widget body;
const MyScaffold({
required this.apple,
required this.body,
super.key,
});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: ...,
body: body,
floatingActionButton: MoreActionsButton(apple),
bottomNavigationBar: ...,
key: key,
);
}
}
One of these actions need to use the current information in body of this scaffold. How is this achievable?
Somehow tried adding FAB in the body itself, but that is not what's expected. Any suggestions on. how this is achievable?
You can create a method which will take parameters like the following