feat: support tcp protocol on android (#903)

This commit is contained in:
Levi authored and GitHub committed 2025-02-03 13:49:46 +08:00
1 parent 2b83a735cb
commit 6863317e9d
1 file changed
+3 -2
@@ -762,7 +762,7 @@ class SettingView extends GetView<SettingController> {
width: 80,
child: DropdownButtonFormField<String>(
value: startCfg.value.network,
onChanged: Util.isDesktop()
onChanged: Util.isDesktop() || Util.isAndroid()
? (value) async {
startCfg.update((val) {
val!.network = value!;
@@ -786,7 +786,8 @@ class SettingView extends GetView<SettingController> {
),
)
];
if (Util.isDesktop() && startCfg.value.network == 'tcp') {
if ((Util.isDesktop() || Util.isAndroid()) &&
startCfg.value.network == 'tcp') {
final arr = startCfg.value.address.split(':');
var ip = '127.0.0.1';
var port = '0';