that error happen when i tried putting a method that need to take buildcontext as an argument in floating action button widget.
I tried moving the same method to different widgets that have builders and it worked fine so why don't the FA button have the parent context ? here is where it happens:
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text('policies list'),
),
body: getList(),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () => showSB(context),
))));`