modify print to debugPrint
This commit is contained in:
parent
75092db7d0
commit
9a5c0b610b
@ -1446,7 +1446,7 @@ void importServer() async {
|
|||||||
if (idServerMsg.isEmpty) {
|
if (idServerMsg.isEmpty) {
|
||||||
oldOptions['custom-rendezvous-server'] = idServer;
|
oldOptions['custom-rendezvous-server'] = idServer;
|
||||||
} else {
|
} else {
|
||||||
print('ID Server invalid return');
|
debugPrint('ID Server invalid return');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1459,7 +1459,7 @@ void importServer() async {
|
|||||||
if (relayServerMsg.isEmpty) {
|
if (relayServerMsg.isEmpty) {
|
||||||
oldOptions['relay-server'] = relayServer;
|
oldOptions['relay-server'] = relayServer;
|
||||||
} else {
|
} else {
|
||||||
print('Relay Server invalid return');
|
debugPrint('Relay Server invalid return');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1471,7 +1471,7 @@ void importServer() async {
|
|||||||
oldOptions['api-server'] = apiServer;
|
oldOptions['api-server'] = apiServer;
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
print('invalid_http');
|
debugPrint('invalid_http');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1480,7 +1480,7 @@ void importServer() async {
|
|||||||
// ok
|
// ok
|
||||||
oldOptions['key'] = key;
|
oldOptions['key'] = key;
|
||||||
await bind.mainSetOptions(json: jsonEncode(oldOptions));
|
await bind.mainSetOptions(json: jsonEncode(oldOptions));
|
||||||
print("set ID/Realy Server Ok");
|
debugPrint("set ID/Realy Server Ok");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1490,16 +1490,15 @@ void importServer() async {
|
|||||||
aNullableString = value?.text;
|
aNullableString = value?.text;
|
||||||
mytext.text = aNullableString.toString();
|
mytext.text = aNullableString.toString();
|
||||||
if (mytext.text.isNotEmpty) {
|
if (mytext.text.isNotEmpty) {
|
||||||
print('Clipboard is not empty');
|
debugPrint('Clipboard is not empty');
|
||||||
try {
|
try {
|
||||||
Map<String, dynamic> config = jsonDecode(mytext.text);
|
Map<String, dynamic> config = jsonDecode(mytext.text);
|
||||||
print(config);
|
|
||||||
if (config.containsKey('IdServer') &&
|
if (config.containsKey('IdServer') &&
|
||||||
config.containsKey('RelayServer')) {
|
config.containsKey('RelayServer')) {
|
||||||
print('IdServer: ${config['IdServer']}');
|
debugPrint('IdServer: ${config['IdServer']}');
|
||||||
print('RelayServer: ${config['RelayServer']}');
|
debugPrint('RelayServer: ${config['RelayServer']}');
|
||||||
print('ApiServer: ${config['ApiServer']}');
|
debugPrint('ApiServer: ${config['ApiServer']}');
|
||||||
print('Key: ${config['Key']}');
|
debugPrint('Key: ${config['Key']}');
|
||||||
Future<bool> success = submit(config['IdServer'],
|
Future<bool> success = submit(config['IdServer'],
|
||||||
config['RelayServer'], config['ApiServer'], config['Key']);
|
config['RelayServer'], config['ApiServer'], config['Key']);
|
||||||
success.then((value) {
|
success.then((value) {
|
||||||
@ -1511,15 +1510,15 @@ void importServer() async {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print('invalid config info');
|
debugPrint('invalid config info');
|
||||||
importServerShow(translate("Invalid server configuration"));
|
importServerShow(translate("Invalid server configuration"));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('invalid config info');
|
debugPrint('invalid config info');
|
||||||
importServerShow(translate("Invalid server configuration"));
|
importServerShow(translate("Invalid server configuration"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print('Clipboard is empty');
|
debugPrint('Clipboard is empty');
|
||||||
importServerShow(translate("Clipboard is empty"));
|
importServerShow(translate("Clipboard is empty"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user