22 lines
517 B
Dart
22 lines
517 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"));
|
|
void cleanupLocalStorate() {
|
|
window.localStorage.remove("token");
|
|
window.localStorage.remove("uuid");
|
|
}
|
|
}
|