fetchBrokerUrlFromPath static method
Implementation
static Future<String> fetchBrokerUrlFromPath(
String path,
String otherwise,
) async {
try {
final response = await http.get(Uri.parse(path));
if (response.statusCode == 200) {
return response.body.trim();
}
} catch (e) {
return otherwise;
}
return otherwise;
}