feat:riverpod 迁移 HomeDownloaderUI

This commit is contained in:
2024-03-10 17:23:28 +08:00
parent 01f1533ab0
commit cf6ab55dd0
11 changed files with 829 additions and 7 deletions

View File

@ -200,7 +200,7 @@ class HomeGameDoctorUIModel extends _$HomeGameDoctorUIModel {
}
}
final cnExp = RegExp(r"[^\x00-\xff]");
final _cnExp = RegExp(r"[^\x00-\xff]");
// ignore: avoid_build_context_in_providers
Future _checkPreInstall(BuildContext context, String scInstalledPath,
@ -217,7 +217,7 @@ class HomeGameDoctorUIModel extends _$HomeGameDoctorUIModel {
await showToast(context, lastScreenInfo);
}
if (cnExp.hasMatch(await SCLoggerHelper.getLogFilePath() ?? "")) {
if (_cnExp.hasMatch(await SCLoggerHelper.getLogFilePath() ?? "")) {
checkResult.add(const MapEntry("cn_user_name", ""));
}
@ -235,7 +235,7 @@ class HomeGameDoctorUIModel extends _$HomeGameDoctorUIModel {
final checkedPath = [];
for (var installPath in listData) {
if (!checkedPath.contains(installPath)) {
if (cnExp.hasMatch(installPath)) {
if (_cnExp.hasMatch(installPath)) {
checkResult.add(MapEntry("cn_install_path", installPath));
}
if (scInstalledPath == "not_install") {

View File

@ -7,7 +7,7 @@ part of 'game_doctor_ui_model.dart';
// **************************************************************************
String _$homeGameDoctorUIModelHash() =>
r'59cbd6f866bacbc24eb0c0eb0ad88fe7f2dac4a7';
r'1e32d75095de065cf2cdedf444f74ffc753ce66f';
/// See also [HomeGameDoctorUIModel].
@ProviderFor(HomeGameDoctorUIModel)