@@ -47,7 +47,7 @@ class _AddAccountPageState extends State<AddAccountPage> {
47
47
}
48
48
49
49
// TODO(#35): show feedback that we're working, while fetching server settings
50
- final serverSettings = await getServerSettings (realmUrl: url. toString () );
50
+ final serverSettings = await getServerSettings (realmUrl: url);
51
51
if (context.mounted) {} // https://github.com/dart-lang/linter/issues/4007
52
52
else {
53
53
return ;
@@ -105,7 +105,7 @@ class _EmailPasswordLoginPageState extends State<EmailPasswordLoginPage> {
105
105
Future <int > _getUserId (FetchApiKeyResult fetchApiKeyResult) async {
106
106
final FetchApiKeyResult (: email, : apiKey) = fetchApiKeyResult;
107
107
final auth = Auth (
108
- realmUrl: widget.realmUrl. toString () , email: email, apiKey: apiKey);
108
+ realmUrl: widget.realmUrl, email: email, apiKey: apiKey);
109
109
final connection = LiveApiConnection (auth: auth); // TODO make this widget testable
110
110
return (await getOwnUser (connection)).userId;
111
111
}
@@ -124,7 +124,7 @@ class _EmailPasswordLoginPageState extends State<EmailPasswordLoginPage> {
124
124
final FetchApiKeyResult result;
125
125
try {
126
126
result = await fetchApiKey (
127
- realmUrl: realmUrl. toString () , username: email, password: password);
127
+ realmUrl: realmUrl, username: email, password: password);
128
128
} on Exception catch (e) { // TODO(#37): distinguish API exceptions
129
129
// TODO(#35): give feedback to user on failed login
130
130
debugPrint (e.toString ());
@@ -139,7 +139,7 @@ class _EmailPasswordLoginPageState extends State<EmailPasswordLoginPage> {
139
139
}
140
140
141
141
final account = Account (
142
- realmUrl: realmUrl. toString () ,
142
+ realmUrl: realmUrl,
143
143
email: result.email,
144
144
apiKey: result.apiKey,
145
145
userId: userId,
0 commit comments