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

18 lines
401 B
Dart

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"));
}