of static method
获取最近祖先的内容色;未包裹时返回黑色。
Implementation
static Color of(BuildContext context) {
final widget = context
.dependOnInheritedWidgetOfExactType<MiuixContentColor>();
return widget?.color ?? const Color(0xFF000000);
}
获取最近祖先的内容色;未包裹时返回黑色。
static Color of(BuildContext context) {
final widget = context
.dependOnInheritedWidgetOfExactType<MiuixContentColor>();
return widget?.color ?? const Color(0xFF000000);
}