浏览代码

fix icon_theme.cs

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
de3587ec
共有 1 个文件被更改,包括 14 次插入4 次删除
  1. 18
      com.unity.uiwidgets/Runtime/widgets/icon_theme.cs

18
com.unity.uiwidgets/Runtime/widgets/icon_theme.cs


using Unity.UIWidgets.foundation;
namespace Unity.UIWidgets.widgets {
public class IconTheme : InheritedWidget {
public class IconTheme : InheritedTheme {
public IconTheme(
Key key = null,
IconThemeData data = null,

public static IconThemeData of(BuildContext context) {
IconThemeData iconThemeData = _getInheritedIconThemeData(context);
return iconThemeData.isConcrete ? iconThemeData : IconThemeData.fallback().merge(iconThemeData);
return iconThemeData.isConcrete ? iconThemeData :
iconThemeData.copyWith(
size: iconThemeData.size ?? IconThemeData.fallback().size,
color: iconThemeData.color ?? IconThemeData.fallback().color,
opacity: iconThemeData.opacity ?? IconThemeData.fallback().opacity
);
IconTheme iconTheme = (IconTheme) context.inheritFromWidgetOfExactType(typeof(IconTheme));
IconTheme iconTheme = (IconTheme) context.dependOnInheritedWidgetOfExactType<IconTheme>();
if (iconTheme != null) {
return iconTheme.data;
}

public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<IconThemeData>("data", data, showName: false));
data.debugFillProperties(properties);
}
public override Widget wrap(BuildContext context, Widget child) {
IconTheme iconTheme = context.findAncestorWidgetOfExactType<IconTheme>();
return this == iconTheme ? child : new IconTheme(data: data, child: child);
}
}
}
正在加载...
取消
保存