import 'package:http/http.dart' as http;

Uri mirrorsUri = Uri(
  scheme: 'https',
  host: 'packages.yzzi.icu',
  path: '/sources_mirrors.list',
);

/// 获取镜像列表，返回一个 List<String>
Future<List<String>> getMirrorList() async {
  final response = await http.get(mirrorsUri);
  final list = response.body.replaceAll('\n', ' ').trimRight().split(' ');
  return list;
}
