mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-29 01:13:24 +08:00
bump: flutter:3.27.0 rust:1.83.0
This commit is contained in:
@ -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(
|
||||
|
@ -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);
|
||||
|
@ -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),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -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 {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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),
|
||||
],
|
||||
|
Reference in New Issue
Block a user