static ShortVideoResource? _fetchSelectedVideoResource()

in example/lib/pages/settings/settings_page.dart [392:410]


  static ShortVideoResource? _fetchSelectedVideoResource(
    List<ShortVideoResource> options,
  ) {
    if (options.isEmpty) {
      return null;
    }

    // 从 SharedPreferences 中获取保存的短视频链接
    final savedLink = SPManager.instance.getString(
      DemoConstants.keyDramaInfoListUrl,
    );
    if (savedLink == null) {
      return null;
    }

    // 找到匹配的短视频资源
    final matches = options.where((option) => option.url == savedLink);
    return matches.isNotEmpty ? matches.first : null;
  }