softplayer-web/lib/api/grpc/creds.dart

18 lines
401 B
Dart
Raw Normal View History

2024-04-29 10:42:16 +00:00
import 'dart:html';
class SoftplayerCreds {
final String uuid;
final String token;
SoftplayerCreds({
required this.token,
required this.uuid,
});
}
class SoftplayerCredsHelpers {
String localStorageEntry(String key) => window.localStorage[key]!;
SoftplayerCreds fromLocalStorage() => SoftplayerCreds(
token: localStorageEntry("token"), uuid: localStorageEntry("uuid"));
}