resolveFrom method Null safety
- BuildContext context
protected">@protected
Returns a new theme data with all its colors resolved against the given BuildContext.
Called by CupertinoTheme.of to resolve colors defined in the retrieved CupertinoThemeData.
Implementation
@protected
NoDefaultCupertinoThemeData resolveFrom(BuildContext context) {
Color? convertColor(Color? color) => CupertinoDynamicColor.maybeResolve(color, context);
return NoDefaultCupertinoThemeData(
brightness: brightness,
primaryColor: convertColor(primaryColor),
primaryContrastingColor: convertColor(primaryContrastingColor),
textTheme: textTheme?.resolveFrom(context),
barBackgroundColor: convertColor(barBackgroundColor),
scaffoldBackgroundColor: convertColor(scaffoldBackgroundColor),
);
}