예제 #1
0
        public new _NoDefaultCupertinoThemeData resolveFrom(BuildContext context, bool nullOk = false)
        {
            Color convertColor(Color color) => CupertinoDynamicColor.resolve(color, context, nullOk: nullOk);

            return(new _NoDefaultCupertinoThemeData(
                       brightness,
                       convertColor(primaryColor),
                       convertColor(primaryContrastingColor),
                       textTheme?.resolveFrom(context, nullOk: nullOk),
                       convertColor(barBackgroundColor),
                       convertColor(scaffoldBackgroundColor)
                       ));
        }
예제 #2
0
        public CupertinoThemeData resolveFrom(BuildContext context, bool nullOk = false)
        {
            Color convertColor(Color color) => CupertinoDynamicColor.resolve(color, context, nullOk: nullOk);

            return(new CupertinoThemeData(
                       brightness: brightness,
                       primaryColor: convertColor(_primaryColor),
                       primaryContrastingColor: convertColor(_primaryContrastingColor),
                       textTheme: _textTheme?.resolveFrom(context, nullOk: nullOk),
                       barBackgroundColor: convertColor(_barBackgroundColor),
                       scaffoldBackgroundColor: convertColor(_scaffoldBackgroundColor),
                       defaults: _defaults.resolveFrom(context, _textTheme == null, nullOk: nullOk)
                       ));
        }