diff --git a/lib/controller/stillbox.dart b/lib/controller/stillbox.dart index e96c146..2b4aa6c 100644 --- a/lib/controller/stillbox.dart +++ b/lib/controller/stillbox.dart @@ -66,7 +66,12 @@ class Stillbox extends ChangeNotifier { baseUri = Uri.parse(uri); setUris(); } - Uri loginUri = Uri.parse('${baseUri!}/login'); + String baseUriString = baseUri.toString(); + // trim trailing slash since gordio router really dislikes it + if (baseUriString.endsWith('/')) { + baseUriString = baseUriString.substring(0, baseUriString.length - 1); + } + Uri loginUri = Uri.parse('$baseUriString/login'); final form = {}; form['username'] = username; form['password'] = password;