Here in my code mapResponse is a variable which can be null, so I want to check and if the mapResponse is null I want the page to navigate to different page in bottom navigation, below given is the code, but it throws the error saying "The instance member 'mapResponse' can't be accessed in an initializer."
Map? mapResponse
final screens = [
const LandingPage(),
const ComingSoon(),
const ComingSoon(),
mapResponse==null?const ProfileDashBoard():const Home()
];