Replies: 3 comments 2 replies
-
Yes, please! I am using PlatformApp which is an abstraction over MaterialApp and CupertinoApp. Theming is an issue since for Cupertino instead of separate light and dark themes, we need to use |
Beta Was this translation helpful? Give feedback.
-
I vote yes, as the general case I am looking at is using Flutter Platform Widgets along with doing platform builders for fluent(ms desktop) widgets. In which I would be setting Apple devices to the default CupertinoTheme without the added Material Theme stuff. That being said, it is generally mappable right now given the updated stuff you did in FCS 6. I guess I will find out as this week I am digging in and implementing examples. |
Beta Was this translation helpful? Give feedback.
-
I can help with this. It would be really useful for the community as 100% of users voted for a YES. |
Beta Was this translation helpful? Give feedback.
-
This request exists also as feature request in the repo issues here: #20
When using
MaterialApp
andFlexColorScheme
to makeThemeData
, if using Cupertino widgets in such aMaterialApp
they already get themed in a way that that is mapped from the Material theme to the Cupertino theme that those widgets use. This is done automatically byThemeData
.However, currently
FlexColorScheme
cannot create aCupertinoThemeData
that could be used to theme aCupertinoApp
.It is possible to add a
toCupertinoTheme
method toFlexColorScheme
that would return aCupertinoThemeData
object based on all givenFlexColorScheme
properties. This theme would however be much more limited and not be able to deliver all the things one can do withThemeData
. This is because Cupertino theming capabilities are much more limited in Flutter, as well as in Apple's human interface guide, it has less features than e.g. Material 3.Since a
CupertinoThemeData
only has these theme properties and no sub-themes, there is really not much one can do to it:Still if it feels like a worthwhile addition, it could be added. The above properties correspond directly to existing ones in
FlexColorScheme
and can easily be mapped to aCupertinoThemeData
in addition toThemeData
.If you vote yes, please discuss and explain what a
FlexColorScheme
CupertinoTheme
should include, support and do?The default color mappings from
ThemeData
and its activeColorScheme
colors to above and correct colors inCupertinoThemeData
is already included viaThemeData
's default mappings. Which to be honest, while they can be changed, they can't be improved. So there is typically no real reason to change them, and if there really is, it can already be accomplished withcopyWith
for those rare occasions.30 votes ·
Beta Was this translation helpful? Give feedback.
All reactions