You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this package, it helps us a lot with modals & bottom sheets on our projects.
I noticed what I believe is a bug when using a CupertinoScaffold in my app. My app has a custom IconTheme, with a fixed size to 20, a fixed color, ... If I get the IconTheme from anywhere in my app with the following, everything is fine.
final iconTheme =IconTheme.of(context);
final size = iconTheme.size;
print(size); //Result is 20
When I add a CupertinoScaffold on top of it, then getting the icon theme size is not ok anymore:
final iconTheme =IconTheme.of(context);
final size = iconTheme.size;
print(size); //Result is 24
After a bit of investigation, I believe it's due to the _CupertinoModalTransition adding a CupertinoTheme, that adds an IconTheme in it's build method with a fixed CupertinoIconThemeData: flutter/lib/src/cupertino/theme.dart file, line 121 to 126:
Hey,
Thanks for this package, it helps us a lot with modals & bottom sheets on our projects.
I noticed what I believe is a bug when using a
CupertinoScaffold
in my app. My app has a customIconTheme
, with a fixed size to 20, a fixed color, ... If I get theIconTheme
from anywhere in my app with the following, everything is fine.When I add a
CupertinoScaffold
on top of it, then getting the icon theme size is not ok anymore:After a bit of investigation, I believe it's due to the
_CupertinoModalTransition
adding aCupertinoTheme
, that adds anIconTheme
in it's build method with a fixedCupertinoIconThemeData
:flutter/lib/src/cupertino/theme.dart
file, line 121 to 126:To fix this temporarily, I am overriding the
IconTheme
under theCupertinoScaffold
with my previousIconTheme
but it's more a hack than a fix:Any idea how to fix this properly? I would be glad to help if someone has an idea for a clean fix.
The text was updated successfully, but these errors were encountered: