39 lines
719 B
Dart
39 lines
719 B
Dart
abstract class Users {
|
|
const Users._();
|
|
|
|
static const user1 = User(
|
|
String.fromEnvironment(
|
|
'USER1_NAME',
|
|
defaultValue: 'alice',
|
|
),
|
|
String.fromEnvironment(
|
|
'USER1_PW',
|
|
defaultValue: 'AliceInWonderland',
|
|
),
|
|
);
|
|
static const user2 = User(
|
|
String.fromEnvironment(
|
|
'USER2_NAME',
|
|
defaultValue: 'bob',
|
|
),
|
|
String.fromEnvironment(
|
|
'USER2_PW',
|
|
defaultValue: 'JoWirSchaffenDas',
|
|
),
|
|
);
|
|
}
|
|
|
|
class User {
|
|
final String name;
|
|
final String password;
|
|
|
|
const User(this.name, this.password);
|
|
}
|
|
|
|
const _homeserverFromEnv = String.fromEnvironment(
|
|
'HOMESERVER',
|
|
defaultValue: 'localhost',
|
|
);
|
|
|
|
const homeserver = 'http://$_homeserverFromEnv';
|