The bodyBuilder provides a context that is not inherited from the context parameter of the showPopover() function, resulting in Material's default colors being used instead of the app's theme colors.
Expected Behavior
As done in dialog.dart of Google's Material package, the theme from the context should be captured and passed to the RawDialogRoute.push()
Exemple from the Material lib:
final CapturedThemes themes = InheritedTheme.capture(
from: context,
to: Navigator.of(
context,
rootNavigator: useRootNavigator,
).context,
);
What operating system are you seeing the problem on?
macOS, iOS, Android, Windows
Relevant log output
No response
Anything else?
Work around would be to wrap the return of the bodyBuilder in a Theme widget using the previous context, like so:
Is there an existing issue for this?
Current Behavior
The
bodyBuilder
provides a context that is not inherited from thecontext
parameter of theshowPopover()
function, resulting in Material's default colors being used instead of the app's theme colors.Expected Behavior
As done in
dialog.dart
of Google's Material package, the theme from the context should be captured and passed to theRawDialogRoute.push()
Exemple from the Material lib:What operating system are you seeing the problem on?
macOS, iOS, Android, Windows
Relevant log output
No response
Anything else?
Work around would be to wrap the return of the
bodyBuilder
in a Theme widget using the previous context, like so:Code of Conduct