Open kegesch opened 4 years ago
@kegesch have you found any solution for this
@ulmas97 No, I ended up using my own Popup-Modal.
This is still a big problem for me - why does this change the theming?
From the little experementing that I did this piece of code seems to cause the troubles:
(located in the createPreviousRouteTheme
method on _CupertinoModalTransition
here)
previousRouteTheme = previousRouteTheme.copyWith(
scaffoldBackgroundColor: ColorTween(
begin: systemBackground,
end: elevatedScaffoldBackgroundColor.resolveFrom(context),
).evaluate(animation),
primaryColor: CupertinoColors.placeholderText.resolveFrom(context), // <- Simply overrides the primary color!
);
// [...]
previousRouteTheme = previousRouteTheme.copyWith(
barBackgroundColor: ColorTween(
begin: barBackgroundColor,
end: elevatedBarBackgroundColor.resolveFrom(context),
).evaluate(animation),
primaryColor: CupertinoColors.placeholderText.resolveFrom(context), // <- Simply overrides the primary color!
);
Why would the wrapper change the theming of its child (not the sheet) anyway?
PS: A quick fix for anyone having this problem is to simply comment out these two lines in the downloaded package in your pubcache folder. If you use VSCode you could simply use F12 to navigate to it.
The iOS status bar color should usually stay the same. However one I surround my
CupertinoPageScaffold
withCupertinoScaffold
. It changes its default color to white (on white background).Although this works fine: