feat(flutter): 增加 debug 运行时服务器地址设置

This commit is contained in:
Zhou Weidong committed 2026-10-17 22:54:07 +08:00
1 parent b76228905c
commit 907562a874
14 files changed
+590 -27

No files matched your search

+11 -2
View File
@@ -2,6 +2,7 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -41,6 +42,7 @@ class MyPage extends StatefulWidget {
this.onSignOut,
this.dramas,
this.onDramaSelected,
this.debugShowSetting = kDebugMode,
});
final Drama drama;
@@ -57,6 +59,7 @@ class MyPage extends StatefulWidget {
final VoidCallback? onSignOut;
final List<Drama>? dramas;
final ValueChanged<Drama>? onDramaSelected;
final bool debugShowSetting;
@override
State<MyPage> createState() => _MyPageState();
@@ -214,7 +217,10 @@ class _MyPageState extends State<MyPage> {
leading: const Icon(Icons.language_rounded, color: AppColors.blueSoft),
title: Text(l10n.appLanguage),
trailing: const Icon(Icons.chevron_right_rounded),
onTap: () => logic.showLanguage(context),
onTap: () => logic.showLanguage(
context,
showServerSetting: widget.debugShowSetting,
),
),
];
@@ -471,7 +477,10 @@ class _MyPageState extends State<MyPage> {
),
title: Text(l10n.settings),
trailing: const Icon(Icons.chevron_right_rounded),
onTap: () => logic.showLanguage(context),
onTap: () => logic.showLanguage(
context,
showServerSetting: widget.debugShowSetting,
),
),
],
),