MCSI-9 refactor: use Strings constants for text and button labels
This commit is contained in:
parent
da442594ee
commit
d6b1b1aebf
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:minecraft_server_installer/main/constants.dart';
|
import 'package:minecraft_server_installer/main/constants.dart';
|
||||||
|
import 'package:minecraft_server_installer/main/framework/ui/strings.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
class AboutTab extends StatelessWidget {
|
class AboutTab extends StatelessWidget {
|
||||||
@ -54,11 +55,11 @@ class AboutTab extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Text(
|
Text(
|
||||||
'讓 Minecraft 伺服器安裝變得更簡單!',
|
Strings.textSlogen,
|
||||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
style: Theme.of(context)
|
||||||
fontWeight: FontWeight.w500,
|
.textTheme
|
||||||
color: Colors.grey.shade700,
|
.bodyLarge
|
||||||
),
|
?.copyWith(fontWeight: FontWeight.w500, color: Colors.grey.shade700),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -66,18 +67,18 @@ class AboutTab extends StatelessWidget {
|
|||||||
const Gap(32),
|
const Gap(32),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
_actionButton(text: '教學影片', svgAssetName: 'assets/svg/youtube.svg'),
|
_actionButton(text: Strings.buttonTutorialVideo, svgAssetName: 'assets/svg/youtube.svg'),
|
||||||
const Gap(12),
|
const Gap(12),
|
||||||
_actionButton(text: '問題回報', svgAssetName: 'assets/svg/bug.svg'),
|
_actionButton(text: Strings.buttonBugReport, svgAssetName: 'assets/svg/bug.svg'),
|
||||||
const Gap(12),
|
const Gap(12),
|
||||||
_actionButton(text: '聯絡作者', svgAssetName: 'assets/svg/send.svg'),
|
_actionButton(text: Strings.buttonContactAuthor, svgAssetName: 'assets/svg/send.svg'),
|
||||||
const Gap(12),
|
const Gap(12),
|
||||||
_actionButton(text: '原始碼', svgAssetName: 'assets/svg/github.svg'),
|
_actionButton(text: Strings.buttonSourceCode, svgAssetName: 'assets/svg/github.svg'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Text(
|
||||||
'Copyright © 2025 SquidSpirit',
|
Strings.textCopyright,
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Colors.grey.shade700),
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Colors.grey.shade700),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -114,10 +115,10 @@ class AboutTab extends StatelessWidget {
|
|||||||
const Gap(12),
|
const Gap(12),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
style: Theme.of(context)
|
||||||
fontWeight: FontWeight.w500,
|
.textTheme
|
||||||
color: Colors.grey.shade700,
|
.bodyMedium
|
||||||
),
|
?.copyWith(fontWeight: FontWeight.w500, color: Colors.grey.shade700),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -8,6 +8,10 @@ abstract class Strings {
|
|||||||
static const fieldMaxRamSize = '最大 RAM 大小';
|
static const fieldMaxRamSize = '最大 RAM 大小';
|
||||||
static const buttonStartToInstall = '開始安裝';
|
static const buttonStartToInstall = '開始安裝';
|
||||||
static const buttonBrowse = '瀏覽';
|
static const buttonBrowse = '瀏覽';
|
||||||
|
static const buttonTutorialVideo = '教學影片';
|
||||||
|
static const buttonBugReport = '問題回報';
|
||||||
|
static const buttonContactAuthor = '聯絡作者';
|
||||||
|
static const buttonSourceCode = '原始碼';
|
||||||
static const tabBasicConfiguration = '基本設定';
|
static const tabBasicConfiguration = '基本設定';
|
||||||
static const tabModConfiguration = '模組設定';
|
static const tabModConfiguration = '模組設定';
|
||||||
static const tabServerProperties = '伺服器選項';
|
static const tabServerProperties = '伺服器選項';
|
||||||
@ -15,4 +19,6 @@ abstract class Strings {
|
|||||||
static const tabInstallationProgress = '安裝進度';
|
static const tabInstallationProgress = '安裝進度';
|
||||||
static const tooltipEulaInfo = '點擊查看 EULA 條款';
|
static const tooltipEulaInfo = '點擊查看 EULA 條款';
|
||||||
static const dialogTitleSelectDirectory = '選擇安裝目錄';
|
static const dialogTitleSelectDirectory = '選擇安裝目錄';
|
||||||
|
static const textSlogen = '讓 Minecraft 伺服器安裝變得更簡單!';
|
||||||
|
static const textCopyright = 'Copyright © 2025 SquidSpirit';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user