Uri replaceUri(Uri uri) { return Uri.parse(uri.toString().replaceFirst('${uri.host}:${uri.port}', serverIp).replaceFirst('http', 'https')); }