final bool showFab = MediaQuery.of(context).viewInsets.bottom==0.0;
//then use Visibility widget to wrap the FAB and set visible attribute to showFab
buildAcitonButton(){
return Visibility(
visible: _showFab,
child: RaisedButton(
child: ...
),
);
}