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;
state = state.copyWith(
themeConf: ThemeConf(
backgroundColor:
HexColor(colorCfg?.background ?? "#132431").withOpacity(.75),
menuColor: HexColor(colorCfg?.menu ?? "#132431").withOpacity(.95),
backgroundColor: HexColor(colorCfg?.background ?? "#132431")
.withValues(alpha: .75),
menuColor:
HexColor(colorCfg?.menu ?? "#132431").withValues(alpha: .95),
micaColor: HexColor(colorCfg?.mica ?? "#0A3142"),
),
);
@ -298,8 +299,8 @@ class AppGlobalModel extends _$AppGlobalModel {
dPrint("reset Color ....");
state = state.copyWith(
themeConf: ThemeConf(
backgroundColor: HexColor("#132431").withOpacity(.75),
menuColor: HexColor("#132431").withOpacity(.95),
backgroundColor: HexColor("#132431").withValues(alpha: .75),
menuColor: HexColor("#132431").withValues(alpha: .95),
micaColor: HexColor("#0A3142"),
),
);

View File

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

View File

@ -1,5 +1,5 @@
// 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

View File

@ -1,5 +1,5 @@
// 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

View File

@ -1,5 +1,5 @@
// 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

View File

@ -1,5 +1,5 @@
// 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

View File

@ -1,5 +1,5 @@
// 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
@ -67,7 +67,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
kDefaultExternalLibraryLoaderConfig;
@override
String get codegenVersion => '2.6.0';
String get codegenVersion => '2.7.0';
@override
int get rustContentHash => 1832496273;

View File

@ -1,5 +1,5 @@
// 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
@ -931,14 +931,14 @@ class RustLibWire implements BaseWire {
_dummy_method_to_enforce_bundlingPtr.asFunction<int Function()>();
}
typedef DartPostCObjectFnType
= ffi.Pointer<ffi.NativeFunction<DartPostCObjectFnTypeFunction>>;
typedef DartPort = ffi.Int64;
typedef DartDartPort = int;
typedef DartPostCObjectFnTypeFunction = ffi.Bool Function(
DartPort port_id, ffi.Pointer<ffi.Void> message);
typedef DartDartPostCObjectFnTypeFunction = bool Function(
DartDartPort port_id, ffi.Pointer<ffi.Void> message);
typedef DartPort = ffi.Int64;
typedef DartDartPort = int;
typedef DartPostCObjectFnType
= ffi.Pointer<ffi.NativeFunction<DartPostCObjectFnTypeFunction>>;
final class wire_cst_list_prim_u_8_strict extends ffi.Struct {
external ffi.Pointer<ffi.Uint8> ptr;

View File

@ -1,5 +1,5 @@
// 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

View File

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

View File

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

View File

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

View File

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

View File

@ -157,13 +157,13 @@ class _$Aria2cModelStateImpl
(identical(other.aria2cDir, aria2cDir) ||
other.aria2cDir == aria2cDir) &&
(identical(other.aria2c, aria2c) || other.aria2c == aria2c) &&
const DeepCollectionEquality()
.equals(other.aria2globalStat, aria2globalStat));
(identical(other.aria2globalStat, aria2globalStat) ||
other.aria2globalStat == aria2globalStat));
}
@override
int get hashCode => Object.hash(runtimeType, aria2cDir, aria2c,
const DeepCollectionEquality().hash(aria2globalStat));
int get hashCode =>
Object.hash(runtimeType, aria2cDir, aria2c, aria2globalStat);
/// Create a copy of Aria2cModelState
/// 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 &&
(identical(other.startUp, startUp) || other.startUp == startUp) &&
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.endMessage, endMessage) ||
other.endMessage == endMessage) &&
@ -255,7 +255,7 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
runtimeType,
startUp,
const DeepCollectionEquality().hash(_files),
const DeepCollectionEquality().hash(fs),
fs,
curPath,
endMessage,
tempOpenFile,

View File

@ -49,7 +49,8 @@ class AboutUI extends HookConsumerWidget {
Text(
S.current.about_app_description,
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(
width: MediaQuery.of(context).size.width * .35,
decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06),
color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .06),
borderRadius: BorderRadius.circular(12)),
child: IconButton(
icon: Padding(
@ -77,7 +80,8 @@ class AboutUI extends HookConsumerWidget {
isTipTextCn.value ? tipTextCN : tipTextEN,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 12, color: Colors.white.withOpacity(.9)),
fontSize: 12,
color: Colors.white.withValues(alpha: .9)),
),
),
onPressed: () {
@ -107,7 +111,7 @@ class AboutUI extends HookConsumerWidget {
Text(
S.current.about_action_btn_faq,
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(
S.current.about_online_feedback,
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(
S.current.about_action_qq_group,
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(
S.current.about_action_email,
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(
S.current.about_action_open_source,
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),
margin: const EdgeInsets.only(left: 18, right: 18),
decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06),
color: FluentTheme.of(context).cardColor.withValues(alpha: .06),
borderRadius: BorderRadius.circular(12)),
child: Column(
children: [
Text(
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),
Row(
@ -279,4 +284,4 @@ class AboutUI extends HookConsumerWidget {
}
}
}
}
}

View File

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

View File

@ -24,7 +24,7 @@ class HomeCountdownDialogUI extends HookConsumerWidget {
Navigator.of(context).pop();
}),
const SizedBox(width: 12),
Text(S.current.home_holiday_countdown),
Text(S.current.home_holiday_countdown),
],
),
content: homeState.countdownFestivalListData == null
@ -87,7 +87,8 @@ class HomeCountdownDialogUI extends HookConsumerWidget {
Text(
S.current.home_holiday_countdown_disclaimer,
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: [
FilledButton(
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),
),
onPressed: () {
@ -52,4 +53,4 @@ class HomeMdContentDialogUI extends HookConsumerWidget {
final r = await RSHttp.getText(url);
return r;
}
}
}

View File

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

View File

@ -255,7 +255,7 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
S.current.downloader_info_p2p_network_note,
style: TextStyle(
fontSize: 14,
color: Colors.white.withOpacity(.6),
color: Colors.white.withValues(alpha: .6),
),
),
const SizedBox(height: 24),
@ -266,7 +266,8 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
TextFormBox(
placeholder: "1、100k、10m、0",
controller: upCtrl,
placeholderStyle: TextStyle(color: Colors.white.withOpacity(.6)),
placeholderStyle:
TextStyle(color: Colors.white.withValues(alpha: .6)),
inputFormatters: [ifr],
),
const SizedBox(height: 12),
@ -275,7 +276,8 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
TextFormBox(
placeholder: "1、100k、10m、0",
controller: downCtrl,
placeholderStyle: TextStyle(color: Colors.white.withOpacity(.6)),
placeholderStyle:
TextStyle(color: Colors.white.withValues(alpha: .6)),
inputFormatters: [ifr],
),
const SizedBox(height: 24),
@ -283,7 +285,7 @@ class HomeDownloaderUIModel extends _$HomeDownloaderUIModel {
S.current.downloader_input_info_p2p_upload_note,
style: TextStyle(
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) &&
const DeepCollectionEquality()
.equals(other._stoppedTasks, _stoppedTasks) &&
const DeepCollectionEquality()
.equals(other.globalStat, globalStat));
(identical(other.globalStat, globalStat) ||
other.globalStat == globalStat));
}
@override
@ -206,7 +206,7 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
const DeepCollectionEquality().hash(_tasks),
const DeepCollectionEquality().hash(_waitingTasks),
const DeepCollectionEquality().hash(_stoppedTasks),
const DeepCollectionEquality().hash(globalStat));
globalStat);
/// Create a copy of HomeDownloaderUIState
/// 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 ??
S.current.doctor_info_result_no_solution),
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(
item.value,
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.play_solid,
color: homeState.isCurGameRunning
? Colors.red.withOpacity(.8)
? Colors.red.withValues(alpha: .8)
: Colors.white,
),
)),
@ -215,7 +215,7 @@ class HomeUI extends HookConsumerWidget {
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: FluentTheme.of(context).cardColor.withOpacity(.03),
color: FluentTheme.of(context).cardColor.withValues(alpha: .03),
),
child: Padding(
padding: const EdgeInsets.all(12),
@ -331,7 +331,7 @@ class HomeUI extends HookConsumerWidget {
Positioned.fill(
child: Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(.3),
color: Colors.black.withValues(alpha: .3),
borderRadius: BorderRadius.circular(12)),
child: const Center(
child: ProgressRing(),
@ -349,7 +349,7 @@ class HomeUI extends HookConsumerWidget {
width: 316,
height: 386,
decoration: BoxDecoration(
color: Colors.white.withOpacity(.1),
color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(12)),
child: SingleChildScrollView(
child: Column(
@ -366,7 +366,7 @@ class HomeUI extends HookConsumerWidget {
child: homeState.rssVideoItems == null
? Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(.1)),
color: Colors.white.withValues(alpha: .1)),
child: makeLoading(context),
)
: Swiper(
@ -427,7 +427,7 @@ class HomeUI extends HookConsumerWidget {
Icon(
FluentIcons.chevron_right,
size: 12,
color: Colors.white.withOpacity(.4),
color: Colors.white.withValues(alpha: .4),
)
],
),
@ -497,7 +497,9 @@ class HomeUI extends HookConsumerWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: states.isHovered
? FluentTheme.of(context).cardColor.withOpacity(.1)
? FluentTheme.of(context)
.cardColor
.withValues(alpha: .1)
: FluentTheme.of(context).cardColor,
),
child: Padding(
@ -506,7 +508,7 @@ class HomeUI extends HookConsumerWidget {
children: [
Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(.2),
color: Colors.white.withValues(alpha: .2),
borderRadius: BorderRadius.circular(1000)),
child: Padding(
padding: const EdgeInsets.all(12),
@ -531,7 +533,7 @@ class HomeUI extends HookConsumerWidget {
item.infoString,
style: TextStyle(
fontSize: 14,
color: Colors.white.withOpacity(.6)),
color: Colors.white.withValues(alpha: .6)),
),
],
)),
@ -610,7 +612,7 @@ class HomeUI extends HookConsumerWidget {
maxLines: 1,
style: TextStyle(
fontSize: 12,
color: Colors.white.withOpacity(.6)),
color: Colors.white.withValues(alpha: .6)),
),
)
],
@ -620,7 +622,7 @@ class HomeUI extends HookConsumerWidget {
Icon(
FluentIcons.chevron_right,
size: 14,
color: Colors.white.withOpacity(.6),
color: Colors.white.withValues(alpha: .6),
)
],
),
@ -691,7 +693,7 @@ class HomeUI extends HookConsumerWidget {
Icon(
FluentIcons.chevron_right,
size: 12,
color: Colors.white.withOpacity(.4),
color: Colors.white.withValues(alpha: .4),
)
],
)
@ -766,7 +768,7 @@ class HomeUI extends HookConsumerWidget {
Icon(
FluentIcons.chevron_right,
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) {
if (value == null) return;
state = state.copyWith(scInstalledPath: value);
ref.read(localizationUIModelProvider.notifier).onChangeGameInstallPath(value);
ref
.read(localizationUIModelProvider.notifier)
.onChangeGameInstallPath(value);
}
doLaunchGame(

View File

@ -68,7 +68,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
controller: srcTextCtrl,
maxLines: 5,
placeholderStyle:
TextStyle(color: Colors.white.withOpacity(.6)),
TextStyle(color: Colors.white.withValues(alpha: .6)),
style: TextStyle(fontSize: 16, color: Colors.white),
onChanged: (str) async {
final text = model.onTextChange("src", str);
@ -99,7 +99,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
controller: destTextCtrl,
maxLines: 5,
placeholderStyle:
TextStyle(color: Colors.white.withOpacity(.6)),
TextStyle(color: Colors.white.withValues(alpha: .6)),
style: TextStyle(fontSize: 16, color: Colors.white),
enabled: true,
onChanged: (str) {
@ -163,7 +163,7 @@ class InputMethodDialogUI extends HookConsumerWidget {
S.current.input_method_disclaimer,
style: TextStyle(
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() =>
r'ec8d0bb5118b74fa12341ed8048dde9335f57878';
r'397b36296183404c07298d83c14f4bce590375fc';
/// See also [InputMethodDialogUIModel].
@ProviderFor(InputMethodDialogUIModel)

View File

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

View File

@ -10,7 +10,6 @@ import 'server.dart';
part 'server_qr_dialog_ui.g.dart';
@riverpod
class ServerQrState extends _$ServerQrState {
@override
@ -62,7 +61,7 @@ class ServerQrDialogUI extends HookConsumerWidget {
] else
Text(
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),
Row(
@ -97,7 +96,8 @@ class ServerQrDialogUI extends HookConsumerWidget {
hasMultipleUrls
? "${urls[index.value]} (${index.value + 1} / ${urls.length})"
: 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(
padding: const EdgeInsets.only(top: 6, bottom: 12),
decoration: BoxDecoration(
color: Colors.white.withOpacity(.05),
color: Colors.white.withValues(alpha: .05),
borderRadius: BorderRadius.circular(4),
),
child: Column(
@ -161,13 +161,13 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
"${item.valuesMap.length}",
style: TextStyle(
fontSize: 14,
color: Colors.white.withOpacity(.6),
color: Colors.white.withValues(alpha: .6),
),
),
const SizedBox(width: 6),
Icon(
FluentIcons.chevron_right,
color: Colors.white.withOpacity(.6),
color: Colors.white.withValues(alpha: .6),
size: 16,
),
],
@ -178,7 +178,7 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
margin: const EdgeInsets.only(top: 6, bottom: 12),
width: MediaQuery.of(context).size.width,
height: 1,
color: Colors.white.withOpacity(.1),
color: Colors.white.withValues(alpha: .1),
),
if (item.isWorking)
Column(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -136,7 +136,8 @@ class SettingsUI extends HookConsumerWidget {
subTitle,
textAlign: TextAlign.start,
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
// **************************************************************************
String _$settingsUIModelHash() => r'00662390cfeab943929fe4820665de211f9ec8ef';
String _$settingsUIModelHash() => r'4b7900c3f77f4d5ff1836cbf700af374b62c943f';
/// See also [SettingsUIModel].
@ProviderFor(SettingsUIModel)

View File

@ -84,12 +84,13 @@ class UpgradeDialogUI extends HookConsumerWidget {
child: Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white.withOpacity(.1),
color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(7)),
child: Text(
S.current.app_upgrade_info_update_server_tip,
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(
assarState.value?.version ?? ""),
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.tools_action_info_not_installed),
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,
style: TextStyle(
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,
style: TextStyle(
fontSize: 13,
color: Colors.white.withOpacity(.6),
color: Colors.white.withValues(alpha: .6),
),
),
],
@ -313,7 +313,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
Text(
S.current.tools_rsi_launcher_enhance_msg_uninstall,
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) {
final inputStream = InputFileStream(data.$1);
final archive =
TarDecoder().decodeBytes(GZipDecoder().decodeBuffer(inputStream));
final output = GZipDecoder().decodeBytes(inputStream.toUint8List());
final archive = TarDecoder().decodeBytes(output);
StringBuffer dataBuffer = StringBuffer("");
for (var element in archive.files) {
if (element.rawContent == null) continue;
final stringContent = utf8.decode(element.rawContent!.readBytes());
if (element.name.endsWith(data.$2)) {
for (var value
in (element.rawContent?.readString() ?? "").split("\n")) {
for (var value in (stringContent).split("\n")) {
final tv = value;
if (tv.isNotEmpty) dataBuffer.writeln(tv);
}
@ -479,4 +480,4 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
}
return scriptBuffer.toString();
}
}
}

View File

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

View File

@ -59,7 +59,9 @@ class UnP4kcUI extends HookConsumerWidget {
children: [
Container(
decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.06)),
color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .06)),
height: 36,
padding: const EdgeInsets.only(left: 12, right: 12),
child: SuperListView.builder(
@ -95,7 +97,9 @@ class UnP4kcUI extends HookConsumerWidget {
Container(
width: MediaQuery.of(context).size.width * .3,
decoration: BoxDecoration(
color: FluentTheme.of(context).cardColor.withOpacity(.01),
color: FluentTheme.of(context)
.cardColor
.withValues(alpha: .01),
),
child: SuperListView.builder(
padding: const EdgeInsets.only(
@ -110,7 +114,7 @@ class UnP4kcUI extends HookConsumerWidget {
decoration: BoxDecoration(
color: FluentTheme.of(context)
.cardColor
.withOpacity(.05),
.withValues(alpha: .05),
),
child: IconButton(
onPressed: () {
@ -164,7 +168,7 @@ class UnP4kcUI extends HookConsumerWidget {
style: TextStyle(
fontSize: 10,
color: Colors.white
.withOpacity(.6)),
.withValues(alpha: .6)),
),
const SizedBox(width: 12),
Text(
@ -172,7 +176,7 @@ class UnP4kcUI extends HookConsumerWidget {
style: TextStyle(
fontSize: 10,
color: Colors.white
.withOpacity(.6)),
.withValues(alpha: .6)),
),
],
),
@ -184,7 +188,7 @@ class UnP4kcUI extends HookConsumerWidget {
Icon(
FluentIcons.chevron_right,
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);
File("./lib/generated/l10n_temp.json").writeAsStringSync(j);
print(
"output to json file (length: ${outputMap
.length}): ./lib/generated/l10n_temp.json");
"output to json file (length: ${outputMap.length}): ./lib/generated/l10n_temp.json");
}
}
@ -76,10 +75,9 @@ class AutoL10nTools {
// sort map with value length
final newMap = Map<String, dynamic>.fromEntries(
jsonMap.entries.toList()
..sort((a, b) =>
(b.value.toString())
.length
.compareTo((a.value.toString()).length)),
..sort((a, b) => (b.value.toString())
.length
.compareTo((a.value.toString()).length)),
);
_replaceDartFile(entity, newMap);
}
@ -91,9 +89,9 @@ class AutoL10nTools {
final toFile = File("./lib/l10n/intl_$to.arb");
final translator = GoogleTranslator();
final formMap =
json.decode(formFile.readAsStringSync()) as Map<String, dynamic>;
json.decode(formFile.readAsStringSync()) as Map<String, dynamic>;
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 toLocaleCode = toMap["@@auto_translate_locale"].toString();

View File

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

View File

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

View File

@ -1,5 +1,5 @@
// 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(
non_camel_case_types,
@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
default_rust_opaque = RustOpaqueNom,
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;
// Section: executor
@ -1144,7 +1144,7 @@ impl SseEncode for () {
#[cfg(not(target_family = "wasm"))]
mod io {
// 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

View File

@ -5,8 +5,6 @@
// 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.
void main() {
// testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// // Build our app and trigger a frame.