File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import 'package:flutter/foundation.dart';
4
4
import 'package:http/http.dart' as http;
5
5
6
6
class Auth {
7
- const Auth ({required this .realmUrl, required this .email, required this .apiKey});
7
+ Auth ({required this .realmUrl, required this .email, required this .apiKey})
8
+ : assert (Uri .parse (realmUrl).query.isEmpty && Uri .parse (realmUrl).fragment.isEmpty);
8
9
9
10
final String realmUrl;
10
11
final String email;
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class PerAccountStore extends ChangeNotifier {
204
204
205
205
@immutable
206
206
class Account extends Auth {
207
- const Account ({
207
+ Account ({
208
208
required super .realmUrl,
209
209
required super .email,
210
210
required super .apiKey,
@@ -243,7 +243,7 @@ class LiveGlobalStore extends GlobalStore {
243
243
///
244
244
/// See "Server credentials" in the project README for how to fill in the
245
245
/// `credential_fixture.dart` file this requires.
246
- const Account _fixtureAccount = Account (
246
+ final Account _fixtureAccount = Account (
247
247
realmUrl: credentials.realmUrl,
248
248
email: credentials.email,
249
249
apiKey: credentials.apiKey,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const String realmUrl = 'https://chat.example/';
7
7
const String recentZulipVersion = '6.1' ;
8
8
const int recentZulipFeatureLevel = 164 ;
9
9
10
- const Account selfAccount = Account (
10
+ final Account selfAccount = Account (
11
11
realmUrl: realmUrl,
12
12
email: 'self@example' ,
13
13
apiKey: 'asdfqwer' ,
@@ -17,7 +17,7 @@ const Account selfAccount = Account(
17
17
zulipMergeBase: recentZulipVersion,
18
18
);
19
19
20
- const Account otherAccount = Account (
20
+ final Account otherAccount = Account (
21
21
realmUrl: realmUrl,
22
22
email: 'other@example' ,
23
23
apiKey: 'sdfgwert' ,
You can’t perform that action at this time.
0 commit comments