I am trying to implement a showCupertinoModalBottomSheet for the theme selection of my app.
But while switching the theme, the overall app theme changes except for the current showCupertinoModalBottomSheet in which the themes are listed.
Is there a way to change it's colour dynamically? Or is there any other Widget which can help me implement this?
text: 'Change theme',
onPressed: () => showCupertinoModalBottomSheet<Widget>(
context: context,
bounce: true,
expand: false,
backgroundColor: themeProvider.currentTheme == THEME_DARK
? Colors.grey[800]
: Colors.white,
builder: (BuildContext context) => _AppPersonalization()),