of static method

String of(
  1. BuildContext context
)

从 context 获取资源路径,未找到则返回默认路径

Implementation

static String of(BuildContext context) {
  final scope =
      context.dependOnInheritedWidgetOfExactType<PlayerAssetsScope>();
  return scope?.assetsPath ?? defaultAssetsPath;
}