bump: flutter:3.27.0 rust:1.83.0

This commit is contained in:
xkeyC 2024-12-14 13:48:24 +08:00
parent 4b70ec1914
commit c112a920ec
47 changed files with 187 additions and 160 deletions

View File

@ -284,9 +284,10 @@ class AppGlobalModel extends _$AppGlobalModel {
final colorCfg = networkVersionData.activityColors; final colorCfg = networkVersionData.activityColors;
state = state.copyWith( state = state.copyWith(
themeConf: ThemeConf( themeConf: ThemeConf(
backgroundColor: backgroundColor: HexColor(colorCfg?.background ?? "#132431")
HexColor(colorCfg?.background ?? "#132431").withOpacity(.75), .withValues(alpha: .75),
menuColor: HexColor(colorCfg?.menu ?? "#132431").withOpacity(.95), menuColor:
HexColor(colorCfg?.menu ?? "#132431").withValues(alpha: .95),
micaColor: HexColor(colorCfg?.mica ?? "#0A3142"), micaColor: HexColor(colorCfg?.mica ?? "#0A3142"),
), ),
); );
@ -298,8 +299,8 @@ class AppGlobalModel extends _$AppGlobalModel {
dPrint("reset Color ...."); dPrint("reset Color ....");
state = state.copyWith( state = state.copyWith(
themeConf: ThemeConf( themeConf: ThemeConf(
backgroundColor: HexColor("#132431").withOpacity(.75), backgroundColor: HexColor("#132431").withValues(alpha: .75),
menuColor: HexColor("#132431").withOpacity(.95), menuColor: HexColor("#132431").withValues(alpha: .95),
micaColor: HexColor("#0A3142"), micaColor: HexColor("#0A3142"),
), ),
); );

View File

@ -35,10 +35,10 @@ class DohClient {
// data demo: {"data":"\"https://git.scbox.xkeyc.cn,https://gitapi.scbox.org\""} // data demo: {"data":"\"https://git.scbox.xkeyc.cn,https://gitapi.scbox.org\""}
if (data == null) return ""; if (data == null) return "";
data = data.trim(); data = data.trim();
if (data.startsWith("\"")){ if (data.startsWith("\"")) {
data = data.substring(1); data = data.substring(1);
} }
if (data.endsWith("\"")){ if (data.endsWith("\"")) {
data = data.substring(0, data.length - 1); data = data.substring(0, data.length - 1);
} }
return data; return data;

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
@ -67,7 +67,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
kDefaultExternalLibraryLoaderConfig; kDefaultExternalLibraryLoaderConfig;
@override @override
String get codegenVersion => '2.6.0'; String get codegenVersion => '2.7.0';
@override @override
int get rustContentHash => 1832496273; int get rustContentHash => 1832496273;

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
@ -931,14 +931,14 @@ class RustLibWire implements BaseWire {
_dummy_method_to_enforce_bundlingPtr.asFunction<int Function()>(); _dummy_method_to_enforce_bundlingPtr.asFunction<int Function()>();
} }
typedef DartPostCObjectFnType typedef DartPort = ffi.Int64;
= ffi.Pointer<ffi.NativeFunction<DartPostCObjectFnTypeFunction>>; typedef DartDartPort = int;
typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( typedef DartPostCObjectFnTypeFunction = ffi.Bool Function(
DartPort port_id, ffi.Pointer<ffi.Void> message); DartPort port_id, ffi.Pointer<ffi.Void> message);
typedef DartDartPostCObjectFnTypeFunction = bool Function( typedef DartDartPostCObjectFnTypeFunction = bool Function(
DartDartPort port_id, ffi.Pointer<ffi.Void> message); DartDartPort port_id, ffi.Pointer<ffi.Void> message);
typedef DartPort = ffi.Int64; typedef DartPostCObjectFnType
typedef DartDartPort = int; = ffi.Pointer<ffi.NativeFunction<DartPostCObjectFnTypeFunction>>;
final class wire_cst_list_prim_u_8_strict extends ffi.Struct { final class wire_cst_list_prim_u_8_strict extends ffi.Struct {
external ffi.Pointer<ffi.Uint8> ptr; external ffi.Pointer<ffi.Uint8> ptr;

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

View File

@ -79,7 +79,7 @@ Future<String?> showInputDialogs(BuildContext context,
if (content.isNotEmpty) if (content.isNotEmpty)
Text( Text(
content, content,
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
TextFormBox( TextFormBox(

View File

@ -5,10 +5,11 @@
class AppTorrentData { class AppTorrentData {
AppTorrentData({ AppTorrentData({
this.name, this.name,
this.updateAt, this.updateAt,
this.url, this.url,
this.info,}); this.info,
});
AppTorrentData.fromJson(dynamic json) { AppTorrentData.fromJson(dynamic json) {
name = json['name']; name = json['name'];
@ -29,5 +30,4 @@ class AppTorrentData {
map['info'] = info; map['info'] = info;
return map; return map;
} }
}
}

View File

@ -85,7 +85,6 @@ class DohClientResponseAnswerData {
} }
} }
class DohClientResponseQuestionData { class DohClientResponseQuestionData {
DohClientResponseQuestionData({ DohClientResponseQuestionData({
this.name, this.name,

View File

@ -70,7 +70,7 @@ class App extends HookConsumerWidget {
defaultButtonStyle: ButtonStyle( defaultButtonStyle: ButtonStyle(
shape: WidgetStateProperty.all(RoundedRectangleBorder( shape: WidgetStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
side: BorderSide(color: Colors.white.withOpacity(.01)))), side: BorderSide(color: Colors.white.withValues(alpha: .01)))),
))), ))),
locale: appState.appLocale, locale: appState.appLocale,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,

View File

@ -157,13 +157,13 @@ class _$Aria2cModelStateImpl
(identical(other.aria2cDir, aria2cDir) || (identical(other.aria2cDir, aria2cDir) ||
other.aria2cDir == aria2cDir) && other.aria2cDir == aria2cDir) &&
(identical(other.aria2c, aria2c) || other.aria2c == aria2c) && (identical(other.aria2c, aria2c) || other.aria2c == aria2c) &&
const DeepCollectionEquality() (identical(other.aria2globalStat, aria2globalStat) ||
.equals(other.aria2globalStat, aria2globalStat)); other.aria2globalStat == aria2globalStat));
} }
@override @override
int get hashCode => Object.hash(runtimeType, aria2cDir, aria2c, int get hashCode =>
const DeepCollectionEquality().hash(aria2globalStat)); Object.hash(runtimeType, aria2cDir, aria2c, aria2globalStat);
/// Create a copy of Aria2cModelState /// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.

View File

@ -240,7 +240,7 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
other is _$Unp4kcStateImpl && other is _$Unp4kcStateImpl &&
(identical(other.startUp, startUp) || other.startUp == startUp) && (identical(other.startUp, startUp) || other.startUp == startUp) &&
const DeepCollectionEquality().equals(other._files, _files) && const DeepCollectionEquality().equals(other._files, _files) &&
const DeepCollectionEquality().equals(other.fs, fs) && (identical(other.fs, fs) || other.fs == fs) &&
(identical(other.curPath, curPath) || other.curPath == curPath) && (identical(other.curPath, curPath) || other.curPath == curPath) &&
(identical(other.endMessage, endMessage) || (identical(other.endMessage, endMessage) ||
other.endMessage == endMessage) && other.endMessage == endMessage) &&
@ -255,7 +255,7 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
runtimeType, runtimeType,
startUp, startUp,
const DeepCollectionEquality().hash(_files), const DeepCollectionEquality().hash(_files),
const DeepCollectionEquality().hash(fs), fs,
curPath, curPath,
endMessage, endMessage,
tempOpenFile, tempOpenFile,

View File

@ -49,7 +49,8 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_app_description, S.current.about_app_description,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.9)), fontSize: 14,
color: Colors.white.withValues(alpha: .9)),
), ),
], ],
), ),
@ -68,7 +69,9 @@ class AboutUI extends HookConsumerWidget {
child: Container( child: Container(
width: MediaQuery.of(context).size.width * .35, width: MediaQuery.of(context).size.width * .35,
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06), color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .06),
borderRadius: BorderRadius.circular(12)), borderRadius: BorderRadius.circular(12)),
child: IconButton( child: IconButton(
icon: Padding( icon: Padding(
@ -77,7 +80,8 @@ class AboutUI extends HookConsumerWidget {
isTipTextCn.value ? tipTextCN : tipTextEN, isTipTextCn.value ? tipTextCN : tipTextEN,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontSize: 12, color: Colors.white.withOpacity(.9)), fontSize: 12,
color: Colors.white.withValues(alpha: .9)),
), ),
), ),
onPressed: () { onPressed: () {
@ -107,7 +111,7 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_action_btn_faq, S.current.about_action_btn_faq,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -124,7 +128,7 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_online_feedback, S.current.about_online_feedback,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -141,7 +145,7 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_action_qq_group, S.current.about_action_qq_group,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -159,7 +163,7 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_action_email, S.current.about_action_email,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -176,7 +180,7 @@ class AboutUI extends HookConsumerWidget {
Text( Text(
S.current.about_action_open_source, S.current.about_action_open_source,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -239,13 +243,14 @@ class AboutUI extends HookConsumerWidget {
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
margin: const EdgeInsets.only(left: 18, right: 18), margin: const EdgeInsets.only(left: 18, right: 18),
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06), color: FluentTheme.of(context).cardColor.withValues(alpha: .06),
borderRadius: BorderRadius.circular(12)), borderRadius: BorderRadius.circular(12)),
child: Column( child: Column(
children: [ children: [
Text( Text(
names[name] ?? name, names[name] ?? name,
style: TextStyle(fontSize: 13, color: Colors.white.withOpacity(.6)), style: TextStyle(
fontSize: 13, color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Row( Row(
@ -279,4 +284,4 @@ class AboutUI extends HookConsumerWidget {
} }
} }
} }
} }

View File

@ -101,7 +101,8 @@ class GuideUI extends HookConsumerWidget {
child: Text( child: Text(
S.current.guide_info_game_download_note, S.current.guide_info_game_download_note,
style: TextStyle( style: TextStyle(
fontSize: 12, color: Colors.white.withOpacity(.6)), fontSize: 12,
color: Colors.white.withValues(alpha: .6)),
textAlign: TextAlign.end, textAlign: TextAlign.end,
), ),
), ),

View File

@ -24,7 +24,7 @@ class HomeCountdownDialogUI extends HookConsumerWidget {
Navigator.of(context).pop(); Navigator.of(context).pop();
}), }),
const SizedBox(width: 12), const SizedBox(width: 12),
Text(S.current.home_holiday_countdown), Text(S.current.home_holiday_countdown),
], ],
), ),
content: homeState.countdownFestivalListData == null content: homeState.countdownFestivalListData == null
@ -87,7 +87,8 @@ class HomeCountdownDialogUI extends HookConsumerWidget {
Text( Text(
S.current.home_holiday_countdown_disclaimer, S.current.home_holiday_countdown_disclaimer,
style: TextStyle( style: TextStyle(
fontSize: 13, color: Colors.white.withOpacity(.3)), fontSize: 13,
color: Colors.white.withValues(alpha: .3)),
) )
], ],
), ),
@ -95,4 +96,4 @@ class HomeCountdownDialogUI extends HookConsumerWidget {
), ),
); );
} }
} }

View File

@ -37,7 +37,8 @@ class HomeMdContentDialogUI extends HookConsumerWidget {
actions: [ actions: [
FilledButton( FilledButton(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 8, right: 8, top: 2, bottom: 2), padding:
const EdgeInsets.only(left: 8, right: 8, top: 2, bottom: 2),
child: Text(S.current.action_close), child: Text(S.current.action_close),
), ),
onPressed: () { onPressed: () {
@ -52,4 +53,4 @@ class HomeMdContentDialogUI extends HookConsumerWidget {
final r = await RSHttp.getText(url); final r = await RSHttp.getText(url);
return r; return r;
} }
} }

View File

@ -105,7 +105,7 @@ class HomeDownloaderUI extends HookConsumerWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context) color: FluentTheme.of(context)
.cardColor .cardColor
.withOpacity(.06), .withValues(alpha: .06),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
child: Row( child: Row(
@ -232,7 +232,7 @@ class HomeDownloaderUI extends HookConsumerWidget {
itemCount: model.getTasksLen(), itemCount: model.getTasksLen(),
)), )),
Container( Container(
color: FluentTheme.of(context).cardColor.withOpacity(.06), color: FluentTheme.of(context).cardColor.withValues(alpha: .06),
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 12, bottom: 3, top: 3), padding: const EdgeInsets.only(left: 12, bottom: 3, top: 3),
child: Row( child: Row(

View File

@ -255,7 +255,7 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
S.current.downloader_info_p2p_network_note, S.current.downloader_info_p2p_network_note,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
@ -266,7 +266,8 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
TextFormBox( TextFormBox(
placeholder: "1、100k、10m、0", placeholder: "1、100k、10m、0",
controller: upCtrl, controller: upCtrl,
placeholderStyle: TextStyle(color: Colors.white.withOpacity(.6)), placeholderStyle:
TextStyle(color: Colors.white.withValues(alpha: .6)),
inputFormatters: [ifr], inputFormatters: [ifr],
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
@ -275,7 +276,8 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
TextFormBox( TextFormBox(
placeholder: "1、100k、10m、0", placeholder: "1、100k、10m、0",
controller: downCtrl, controller: downCtrl,
placeholderStyle: TextStyle(color: Colors.white.withOpacity(.6)), placeholderStyle:
TextStyle(color: Colors.white.withValues(alpha: .6)),
inputFormatters: [ifr], inputFormatters: [ifr],
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
@ -283,7 +285,7 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
S.current.downloader_input_info_p2p_upload_note, S.current.downloader_input_info_p2p_upload_note,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
) )
], ],

View File

@ -196,8 +196,8 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
.equals(other._waitingTasks, _waitingTasks) && .equals(other._waitingTasks, _waitingTasks) &&
const DeepCollectionEquality() const DeepCollectionEquality()
.equals(other._stoppedTasks, _stoppedTasks) && .equals(other._stoppedTasks, _stoppedTasks) &&
const DeepCollectionEquality() (identical(other.globalStat, globalStat) ||
.equals(other.globalStat, globalStat)); other.globalStat == globalStat));
} }
@override @override
@ -206,7 +206,7 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
const DeepCollectionEquality().hash(_tasks), const DeepCollectionEquality().hash(_tasks),
const DeepCollectionEquality().hash(_waitingTasks), const DeepCollectionEquality().hash(_waitingTasks),
const DeepCollectionEquality().hash(_stoppedTasks), const DeepCollectionEquality().hash(_stoppedTasks),
const DeepCollectionEquality().hash(globalStat)); globalStat);
/// Create a copy of HomeDownloaderUIState /// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.

View File

@ -223,7 +223,7 @@ class HomeGameDoctorUI extends HookConsumerWidget {
errorNames[item.key]?.value ?? errorNames[item.key]?.value ??
S.current.doctor_info_result_no_solution), S.current.doctor_info_result_no_solution),
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.7)), fontSize: 14, color: Colors.white.withValues(alpha: .7)),
), ),
], ],
), ),
@ -264,7 +264,8 @@ class HomeGameDoctorUI extends HookConsumerWidget {
Text( Text(
item.value, item.value,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.7)), fontSize: 14,
color: Colors.white.withValues(alpha: .7)),
), ),
], ],
), ),

View File

@ -172,7 +172,7 @@ class HomeUI extends HookConsumerWidget {
? FluentIcons.stop_solid ? FluentIcons.stop_solid
: FluentIcons.play_solid, : FluentIcons.play_solid,
color: homeState.isCurGameRunning color: homeState.isCurGameRunning
? Colors.red.withOpacity(.8) ? Colors.red.withValues(alpha: .8)
: Colors.white, : Colors.white,
), ),
)), )),
@ -215,7 +215,7 @@ class HomeUI extends HookConsumerWidget {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: FluentTheme.of(context).cardColor.withOpacity(.03), color: FluentTheme.of(context).cardColor.withValues(alpha: .03),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
@ -331,7 +331,7 @@ class HomeUI extends HookConsumerWidget {
Positioned.fill( Positioned.fill(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black.withOpacity(.3), color: Colors.black.withValues(alpha: .3),
borderRadius: BorderRadius.circular(12)), borderRadius: BorderRadius.circular(12)),
child: const Center( child: const Center(
child: ProgressRing(), child: ProgressRing(),
@ -349,7 +349,7 @@ class HomeUI extends HookConsumerWidget {
width: 316, width: 316,
height: 386, height: 386,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.1), color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(12)), borderRadius: BorderRadius.circular(12)),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
@ -366,7 +366,7 @@ class HomeUI extends HookConsumerWidget {
child: homeState.rssVideoItems == null child: homeState.rssVideoItems == null
? Container( ? Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.1)), color: Colors.white.withValues(alpha: .1)),
child: makeLoading(context), child: makeLoading(context),
) )
: Swiper( : Swiper(
@ -427,7 +427,7 @@ class HomeUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 12, size: 12,
color: Colors.white.withOpacity(.4), color: Colors.white.withValues(alpha: .4),
) )
], ],
), ),
@ -497,7 +497,9 @@ class HomeUI extends HookConsumerWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: states.isHovered color: states.isHovered
? FluentTheme.of(context).cardColor.withOpacity(.1) ? FluentTheme.of(context)
.cardColor
.withValues(alpha: .1)
: FluentTheme.of(context).cardColor, : FluentTheme.of(context).cardColor,
), ),
child: Padding( child: Padding(
@ -506,7 +508,7 @@ class HomeUI extends HookConsumerWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.2), color: Colors.white.withValues(alpha: .2),
borderRadius: BorderRadius.circular(1000)), borderRadius: BorderRadius.circular(1000)),
child: Padding( child: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
@ -531,7 +533,7 @@ class HomeUI extends HookConsumerWidget {
item.infoString, item.infoString,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.white.withOpacity(.6)), color: Colors.white.withValues(alpha: .6)),
), ),
], ],
)), )),
@ -610,7 +612,7 @@ class HomeUI extends HookConsumerWidget {
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Colors.white.withOpacity(.6)), color: Colors.white.withValues(alpha: .6)),
), ),
) )
], ],
@ -620,7 +622,7 @@ class HomeUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 14, size: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
) )
], ],
), ),
@ -691,7 +693,7 @@ class HomeUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 12, size: 12,
color: Colors.white.withOpacity(.4), color: Colors.white.withValues(alpha: .4),
) )
], ],
) )
@ -766,7 +768,7 @@ class HomeUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 14, size: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
) )
], ],
); );

View File

@ -338,7 +338,9 @@ class HomeUIModel extends _$HomeUIModel {
void onChangeInstallPath(String? value) { void onChangeInstallPath(String? value) {
if (value == null) return; if (value == null) return;
state = state.copyWith(scInstalledPath: value); state = state.copyWith(scInstalledPath: value);
ref.read(localizationUIModelProvider.notifier).onChangeGameInstallPath(value); ref
.read(localizationUIModelProvider.notifier)
.onChangeGameInstallPath(value);
} }
doLaunchGame( doLaunchGame(

View File

@ -68,7 +68,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
controller: srcTextCtrl, controller: srcTextCtrl,
maxLines: 5, maxLines: 5,
placeholderStyle: placeholderStyle:
TextStyle(color: Colors.white.withOpacity(.6)), TextStyle(color: Colors.white.withValues(alpha: .6)),
style: TextStyle(fontSize: 16, color: Colors.white), style: TextStyle(fontSize: 16, color: Colors.white),
onChanged: (str) async { onChanged: (str) async {
final text = model.onTextChange("src", str); final text = model.onTextChange("src", str);
@ -99,7 +99,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
controller: destTextCtrl, controller: destTextCtrl,
maxLines: 5, maxLines: 5,
placeholderStyle: placeholderStyle:
TextStyle(color: Colors.white.withOpacity(.6)), TextStyle(color: Colors.white.withValues(alpha: .6)),
style: TextStyle(fontSize: 16, color: Colors.white), style: TextStyle(fontSize: 16, color: Colors.white),
enabled: true, enabled: true,
onChanged: (str) { onChanged: (str) {
@ -163,7 +163,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
S.current.input_method_disclaimer, S.current.input_method_disclaimer,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
) )

View File

@ -7,7 +7,7 @@ part of 'input_method_dialog_ui_model.dart';
// ************************************************************************** // **************************************************************************
String _$inputMethodDialogUIModelHash() => String _$inputMethodDialogUIModelHash() =>
r'ec8d0bb5118b74fa12341ed8048dde9335f57878'; r'397b36296183404c07298d83c14f4bce590375fc';
/// See also [InputMethodDialogUIModel]. /// See also [InputMethodDialogUIModel].
@ProviderFor(InputMethodDialogUIModel) @ProviderFor(InputMethodDialogUIModel)

View File

@ -214,4 +214,4 @@ class InputMethodServer extends _$InputMethodServer {
return Response.notFound("Not Found"); return Response.notFound("Not Found");
} }
} }
} }

View File

@ -10,7 +10,6 @@ import 'server.dart';
part 'server_qr_dialog_ui.g.dart'; part 'server_qr_dialog_ui.g.dart';
@riverpod @riverpod
class ServerQrState extends _$ServerQrState { class ServerQrState extends _$ServerQrState {
@override @override
@ -62,7 +61,7 @@ class ServerQrDialogUI extends HookConsumerWidget {
] else ] else
Text( Text(
S.current.input_method_scan_qr_code, S.current.input_method_scan_qr_code,
style: TextStyle(color: Colors.white.withOpacity(.8)), style: TextStyle(color: Colors.white.withValues(alpha: .8)),
), ),
SizedBox(height: 24), SizedBox(height: 24),
Row( Row(
@ -97,7 +96,8 @@ class ServerQrDialogUI extends HookConsumerWidget {
hasMultipleUrls hasMultipleUrls
? "${urls[index.value]} (${index.value + 1} / ${urls.length})" ? "${urls[index.value]} (${index.value + 1} / ${urls.length})"
: urls[index.value], : urls[index.value],
style: TextStyle(fontSize: 13, color: Colors.white.withOpacity(.6)), style: TextStyle(
fontSize: 13, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -120,4 +120,4 @@ class ServerQrDialogUI extends HookConsumerWidget {
], ],
); );
} }
} }

View File

@ -137,7 +137,7 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
return Container( return Container(
padding: const EdgeInsets.only(top: 6, bottom: 12), padding: const EdgeInsets.only(top: 6, bottom: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.05), color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
), ),
child: Column( child: Column(
@ -161,13 +161,13 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
"${item.valuesMap.length}", "${item.valuesMap.length}",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
size: 16, size: 16,
), ),
], ],
@ -178,7 +178,7 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
margin: const EdgeInsets.only(top: 6, bottom: 12), margin: const EdgeInsets.only(top: 6, bottom: 12),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 1, height: 1,
color: Colors.white.withOpacity(.1), color: Colors.white.withValues(alpha: .1),
), ),
if (item.isWorking) if (item.isWorking)
Column( Column(

View File

@ -321,8 +321,8 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
// ignore: avoid_build_context_in_providers // ignore: avoid_build_context_in_providers
Future<void> onInstall(BuildContext context) async { Future<void> onInstall(BuildContext context) async {
var isEnableCommunityInputMethod = true; var isEnableCommunityInputMethod = true;
final userOK = await showConfirmDialogs(context, final userOK = await showConfirmDialogs(
S.current.input_method_confirm_install_advanced_localization, context, S.current.input_method_confirm_install_advanced_localization,
HookConsumer( HookConsumer(
builder: (BuildContext context, WidgetRef ref, Widget? child) { builder: (BuildContext context, WidgetRef ref, Widget? child) {
final globalIni = useState<StringBuffer?>(null); final globalIni = useState<StringBuffer?>(null);

View File

@ -158,7 +158,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Container( Container(
color: Colors.white.withOpacity(.1), color: Colors.white.withValues(alpha: .1),
height: 1, height: 1,
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
@ -171,7 +171,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
.localization_info_no_translation_available, .localization_info_no_translation_available,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withOpacity(.8)), color: Colors.white.withValues(alpha: .8)),
), ),
) )
else else
@ -217,7 +217,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
child: Container( child: Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(tapDisabled ? .03 : .05), color: Colors.white.withValues(alpha: tapDisabled ? .03 : .05),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
child: Column( child: Column(
@ -237,19 +237,22 @@ class LocalizationDialogUI extends HookConsumerWidget {
Text( Text(
S.current.localization_info_version_number( S.current.localization_info_version_number(
item.value.versionName ?? ""), item.value.versionName ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(
color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
S.current.localization_info_channel( S.current.localization_info_channel(
item.value.gameChannel ?? ""), item.value.gameChannel ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(
color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
S.current.localization_info_update_time( S.current.localization_info_update_time(
item.value.updateAt ?? ""), item.value.updateAt ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(
color: Colors.white.withValues(alpha: .6)),
), ),
], ],
), ),
@ -266,7 +269,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
: isItemEnabled : isItemEnabled
? FluentIcons.download ? FluentIcons.download
: FluentIcons.disable_updates, : FluentIcons.disable_updates,
color: Colors.white.withOpacity(.8), color: Colors.white.withValues(alpha: .8),
size: 18, size: 18,
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
@ -277,7 +280,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
? S.current.localization_action_install ? S.current.localization_action_install
: S.current.localization_info_unavailable), : S.current.localization_info_unavailable),
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(.8), color: Colors.white.withValues(alpha: .8),
), ),
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
@ -285,7 +288,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 14, size: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
) )
] ]
], ],
@ -297,7 +300,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(.4), color: Colors.white.withValues(alpha: .4),
fontSize: 13, fontSize: 13,
), ),
), ),
@ -342,7 +345,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
height: 6, height: 6,
), ),
Container( Container(
color: Colors.white.withOpacity(.1), color: Colors.white.withValues(alpha: .1),
height: 1, height: 1,
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
@ -496,7 +499,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 14, size: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
) )
], ],
), ),

View File

@ -90,7 +90,7 @@ class LocalizationFromFileDialogUI extends HookConsumerWidget {
Center( Center(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.05), color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
@ -104,7 +104,7 @@ class LocalizationFromFileDialogUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.file_code, FluentIcons.file_code,
size: 32, size: 32,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Text(S.current Text(S.current
@ -122,7 +122,7 @@ class LocalizationFromFileDialogUI extends HookConsumerWidget {
Expanded( Expanded(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.05), color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
padding: const EdgeInsets.all(6), padding: const EdgeInsets.all(6),
@ -138,7 +138,8 @@ class LocalizationFromFileDialogUI extends HookConsumerWidget {
Row( Row(
children: [ children: [
Text( Text(
S.current.input_method_install_community_input_method_support, S.current
.input_method_install_community_input_method_support,
), ),
Spacer(), Spacer(),
ToggleSwitch( ToggleSwitch(
@ -160,4 +161,4 @@ class LocalizationFromFileDialogUI extends HookConsumerWidget {
), ),
); );
} }
} }

View File

@ -1,5 +1,6 @@
// ignore_for_file: avoid_build_context_in_providers // ignore_for_file: avoid_build_context_in_providers
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:archive/archive_io.dart'; import 'package:archive/archive_io.dart';
@ -421,13 +422,14 @@ class LocalizationUIModel extends _$LocalizationUIModel {
static StringBuffer readArchive(String savePath) { static StringBuffer readArchive(String savePath) {
final inputStream = InputFileStream(savePath); final inputStream = InputFileStream(savePath);
final archive = final output = GZipDecoder().decodeBytes(inputStream.toUint8List());
TarDecoder().decodeBytes(GZipDecoder().decodeBuffer(inputStream)); final archive = TarDecoder().decodeBytes(output);
StringBuffer globalIni = StringBuffer(""); StringBuffer globalIni = StringBuffer("");
for (var element in archive.files) { for (var element in archive.files) {
if (element.name.contains("global.ini")) { if (element.name.contains("global.ini")) {
for (var value if (element.rawContent == null) continue;
in (element.rawContent?.readString() ?? "").split("\n")) { final stringContent = utf8.decode(element.rawContent!.readBytes());
for (var value in (stringContent).split("\n")) {
final tv = value.trim(); final tv = value.trim();
if (tv.isNotEmpty) globalIni.writeln(value); if (tv.isNotEmpty) globalIni.writeln(value);
} }
@ -642,19 +644,19 @@ class LocalizationUIModel extends _$LocalizationUIModel {
Text( Text(
S.current.localization_info_version_number( S.current.localization_info_version_number(
item.value.versionName ?? ""), item.value.versionName ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
S.current S.current
.localization_info_channel(item.value.gameChannel ?? ""), .localization_info_channel(item.value.gameChannel ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
S.current S.current
.localization_info_update_time(item.value.updateAt ?? ""), .localization_info_update_time(item.value.updateAt ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
], ],

View File

@ -171,7 +171,8 @@ class HomePerformanceUI extends HookConsumerWidget {
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
Container( Container(
color: FluentTheme.of(context).cardColor.withOpacity(.2), color:
FluentTheme.of(context).cardColor.withValues(alpha: .2),
height: 1), height: 1),
const SizedBox(height: 6), const SizedBox(height: 6),
for (final item in group.value) makeItem(context, item, model) for (final item in group.value) makeItem(context, item, model)
@ -259,8 +260,8 @@ class HomePerformanceUI extends HookConsumerWidget {
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
"${item.info}", "${item.info}",
style: style: TextStyle(
TextStyle(fontSize: 14, color: Colors.white.withOpacity(.6)), fontSize: 14, color: Colors.white.withValues(alpha: .6)),
), ),
], ],
const SizedBox(height: 12), const SizedBox(height: 12),
@ -271,13 +272,13 @@ class HomePerformanceUI extends HookConsumerWidget {
Text( Text(
S.current.performance_info_min_max_values( S.current.performance_info_min_max_values(
item.key ?? "", item.min ?? "", item.max ?? ""), item.key ?? "", item.min ?? "", item.max ?? ""),
style: TextStyle(color: Colors.white.withOpacity(.6)), style: TextStyle(color: Colors.white.withValues(alpha: .6)),
) )
], ],
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
Container( Container(
color: FluentTheme.of(context).cardColor.withOpacity(.1), color: FluentTheme.of(context).cardColor.withValues(alpha: .1),
height: 1), height: 1),
], ],
), ),

View File

@ -60,7 +60,7 @@ class IndexUI extends HookConsumerWidget {
child: Icon( child: Icon(
FluentIcons.installation, FluentIcons.installation,
size: 22, size: 22,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
_makeAria2TaskNumWidget() _makeAria2TaskNumWidget()

View File

@ -136,7 +136,8 @@ class SettingsUI extends HookConsumerWidget {
subTitle, subTitle,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontSize: 12, color: Colors.white.withOpacity(.6)), fontSize: 12,
color: Colors.white.withValues(alpha: .6)),
), ),
), ),
] ]

View File

@ -6,7 +6,7 @@ part of 'settings_ui_model.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$settingsUIModelHash() => r'00662390cfeab943929fe4820665de211f9ec8ef'; String _$settingsUIModelHash() => r'4b7900c3f77f4d5ff1836cbf700af374b62c943f';
/// See also [SettingsUIModel]. /// See also [SettingsUIModel].
@ProviderFor(SettingsUIModel) @ProviderFor(SettingsUIModel)

View File

@ -84,12 +84,13 @@ class UpgradeDialogUI extends HookConsumerWidget {
child: Container( child: Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.1), color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(7)), borderRadius: BorderRadius.circular(7)),
child: Text( child: Text(
S.current.app_upgrade_info_update_server_tip, S.current.app_upgrade_info_update_server_tip,
style: TextStyle( style: TextStyle(
fontSize: 14, color: Colors.white.withOpacity(.7)), fontSize: 14,
color: Colors.white.withValues(alpha: .7)),
), ),
), ),
), ),

View File

@ -155,7 +155,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
S.current.tools_rsi_launcher_enhance_msg_version( S.current.tools_rsi_launcher_enhance_msg_version(
assarState.value?.version ?? ""), assarState.value?.version ?? ""),
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
), ),
@ -165,7 +165,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
? S.current.localization_info_installed ? S.current.localization_info_installed
: S.current.tools_action_info_not_installed), : S.current.tools_action_info_not_installed),
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
) )
], ],
@ -196,7 +196,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
.tools_rsi_launcher_enhance_subtitle_localization, .tools_rsi_launcher_enhance_subtitle_localization,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
], ],
@ -283,7 +283,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
.tools_rsi_launcher_enhance_subtitle_download_booster, .tools_rsi_launcher_enhance_subtitle_download_booster,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
], ],
@ -313,7 +313,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
Text( Text(
S.current.tools_rsi_launcher_enhance_msg_uninstall, S.current.tools_rsi_launcher_enhance_msg_uninstall,
style: TextStyle( style: TextStyle(
color: Colors.white.withOpacity(.6), fontSize: 13), color: Colors.white.withValues(alpha: .6), fontSize: 13),
), ),
], ],
], ],
@ -414,13 +414,14 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
static StringBuffer _readArchive((String savePath, String fileName) data) { static StringBuffer _readArchive((String savePath, String fileName) data) {
final inputStream = InputFileStream(data.$1); final inputStream = InputFileStream(data.$1);
final archive = final output = GZipDecoder().decodeBytes(inputStream.toUint8List());
TarDecoder().decodeBytes(GZipDecoder().decodeBuffer(inputStream)); final archive = TarDecoder().decodeBytes(output);
StringBuffer dataBuffer = StringBuffer(""); StringBuffer dataBuffer = StringBuffer("");
for (var element in archive.files) { for (var element in archive.files) {
if (element.rawContent == null) continue;
final stringContent = utf8.decode(element.rawContent!.readBytes());
if (element.name.endsWith(data.$2)) { if (element.name.endsWith(data.$2)) {
for (var value for (var value in (stringContent).split("\n")) {
in (element.rawContent?.readString() ?? "").split("\n")) {
final tv = value; final tv = value;
if (tv.isNotEmpty) dataBuffer.writeln(tv); if (tv.isNotEmpty) dataBuffer.writeln(tv);
} }
@ -479,4 +480,4 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
} }
return scriptBuffer.toString(); return scriptBuffer.toString();
} }
} }

View File

@ -106,7 +106,8 @@ class ToolsUI extends HookConsumerWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(.2), color:
Colors.white.withValues(alpha: .2),
borderRadius: borderRadius:
BorderRadius.circular(1000)), BorderRadius.circular(1000)),
child: Padding( child: Padding(
@ -128,7 +129,7 @@ class ToolsUI extends HookConsumerWidget {
item.infoString, item.infoString,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.white.withOpacity(.6)), color: Colors.white.withValues(alpha: .6)),
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Row( Row(

View File

@ -59,7 +59,9 @@ class UnP4kcUI extends HookConsumerWidget {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06)), color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .06)),
height: 36, height: 36,
padding: const EdgeInsets.only(left: 12, right: 12), padding: const EdgeInsets.only(left: 12, right: 12),
child: SuperListView.builder( child: SuperListView.builder(
@ -95,7 +97,9 @@ class UnP4kcUI extends HookConsumerWidget {
Container( Container(
width: MediaQuery.of(context).size.width * .3, width: MediaQuery.of(context).size.width * .3,
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.01), color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .01),
), ),
child: SuperListView.builder( child: SuperListView.builder(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
@ -110,7 +114,7 @@ class UnP4kcUI extends HookConsumerWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: FluentTheme.of(context) color: FluentTheme.of(context)
.cardColor .cardColor
.withOpacity(.05), .withValues(alpha: .05),
), ),
child: IconButton( child: IconButton(
onPressed: () { onPressed: () {
@ -164,7 +168,7 @@ class UnP4kcUI extends HookConsumerWidget {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
color: Colors.white color: Colors.white
.withOpacity(.6)), .withValues(alpha: .6)),
), ),
const SizedBox(width: 12), const SizedBox(width: 12),
Text( Text(
@ -172,7 +176,7 @@ class UnP4kcUI extends HookConsumerWidget {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
color: Colors.white color: Colors.white
.withOpacity(.6)), .withValues(alpha: .6)),
), ),
], ],
), ),
@ -184,7 +188,7 @@ class UnP4kcUI extends HookConsumerWidget {
Icon( Icon(
FluentIcons.chevron_right, FluentIcons.chevron_right,
size: 14, size: 14,
color: Colors.white.withOpacity(.6), color: Colors.white.withValues(alpha: .6),
) )
], ],
), ),

View File

@ -48,8 +48,7 @@ class AutoL10nTools {
final j = json.encode(outputMap); final j = json.encode(outputMap);
File("./lib/generated/l10n_temp.json").writeAsStringSync(j); File("./lib/generated/l10n_temp.json").writeAsStringSync(j);
print( print(
"output to json file (length: ${outputMap "output to json file (length: ${outputMap.length}): ./lib/generated/l10n_temp.json");
.length}): ./lib/generated/l10n_temp.json");
} }
} }
@ -76,10 +75,9 @@ class AutoL10nTools {
// sort map with value length // sort map with value length
final newMap = Map<String, dynamic>.fromEntries( final newMap = Map<String, dynamic>.fromEntries(
jsonMap.entries.toList() jsonMap.entries.toList()
..sort((a, b) => ..sort((a, b) => (b.value.toString())
(b.value.toString()) .length
.length .compareTo((a.value.toString()).length)),
.compareTo((a.value.toString()).length)),
); );
_replaceDartFile(entity, newMap); _replaceDartFile(entity, newMap);
} }
@ -91,9 +89,9 @@ class AutoL10nTools {
final toFile = File("./lib/l10n/intl_$to.arb"); final toFile = File("./lib/l10n/intl_$to.arb");
final translator = GoogleTranslator(); final translator = GoogleTranslator();
final formMap = final formMap =
json.decode(formFile.readAsStringSync()) as Map<String, dynamic>; json.decode(formFile.readAsStringSync()) as Map<String, dynamic>;
final toMap = final toMap =
json.decode(toFile.readAsStringSync()) as Map<String, dynamic>; json.decode(toFile.readAsStringSync()) as Map<String, dynamic>;
final formLocaleCode = formMap["@@auto_translate_locale"].toString(); final formLocaleCode = formMap["@@auto_translate_locale"].toString();
final toLocaleCode = toMap["@@auto_translate_locale"].toString(); final toLocaleCode = toMap["@@auto_translate_locale"].toString();

View File

@ -10,6 +10,7 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
flutter_riverpod: ^2.6.1 flutter_riverpod: ^2.6.1
@ -36,13 +37,13 @@ dependencies:
file_sizes: ^1.0.6 file_sizes: ^1.0.6
desktop_webview_window: ^0.2.3 desktop_webview_window: ^0.2.3
flutter_svg: ^2.0.7 flutter_svg: ^2.0.7
archive: ^3.4.4 archive: ^4.0.1
jwt_decode: ^0.3.1 jwt_decode: ^0.3.1
uuid: ^4.1.0 uuid: ^4.1.0
flutter_tilt: ^3.0.0 flutter_tilt: ^3.0.0
card_swiper: ^3.0.1 card_swiper: ^3.0.1
ffi: ^2.1.0 ffi: ^2.1.0
flutter_rust_bridge: 2.6.0 flutter_rust_bridge: ^2.7.0
freezed_annotation: ^2.4.1 freezed_annotation: ^2.4.1
meta: ^1.9.1 meta: ^1.9.1
hexcolor: ^3.0.1 hexcolor: ^3.0.1
@ -80,7 +81,7 @@ dev_dependencies:
riverpod_generator: ^2.6.2 riverpod_generator: ^2.6.2
custom_lint: ^0.7.0 custom_lint: ^0.7.0
riverpod_lint: ^2.6.2 riverpod_lint: ^2.6.2
ffigen: ^15.0.0 ffigen: ^16.0.0
sct_dev_tools: sct_dev_tools:
path: ./packages/sct_dev_tools path: ./packages/sct_dev_tools

View File

@ -11,7 +11,7 @@ strip = "debuginfo"
crate-type = ["cdylib", "staticlib"] crate-type = ["cdylib", "staticlib"]
[dependencies] [dependencies]
flutter_rust_bridge = "=2.6.0" flutter_rust_bridge = "=2.7.0"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] } tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] }
futures = { version = "0.3", default-features = false, features = ["executor"] } futures = { version = "0.3", default-features = false, features = ["executor"] }
url = "2.5" url = "2.5"

View File

@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
#![allow( #![allow(
non_camel_case_types, non_camel_case_types,
@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_opaque = RustOpaqueNom, default_rust_opaque = RustOpaqueNom,
default_rust_auto_opaque = RustAutoOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom,
); );
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.6.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.7.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1832496273; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1832496273;
// Section: executor // Section: executor
@ -1144,7 +1144,7 @@ impl SseEncode for () {
#[cfg(not(target_family = "wasm"))] #[cfg(not(target_family = "wasm"))]
mod io { mod io {
// This file is automatically generated, so please do not edit it. // This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.6.0. // @generated by `flutter_rust_bridge`@ 2.7.0.
// Section: imports // Section: imports

View File

@ -5,8 +5,6 @@
// gestures. You can also use WidgetTester to find child widgets in the widget // gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
void main() { void main() {
// testWidgets('Counter increments smoke test', (WidgetTester tester) async { // testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// // Build our app and trigger a frame. // // Build our app and trigger a frame.