nexus/lib/models/client_state.dart
Henry-Hiles ff9bf3bec4 Push Notifications (#66)
Fixes #35.

Things to do:
- [x] Register with local distributor
- [x] Register with homeserver
- [x] Recieve messages
- [x] Show notifications
- [ ] Notifications page (could come later)

Reviewed-on: #66
2026-09-10 15:37:05 -04:00

20 lines
610 B
Dart

import "package:freezed_annotation/freezed_annotation.dart";
part "client_state.freezed.dart";
part "client_state.g.dart";
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const ClientState({
required final bool isInitialized,
required final bool isLoggedIn,
required final bool isVerified,
required final String? userId,
required final String? deviceId,
required final String? homeserverUrl,
}) with _$ClientState {
Map<String, Object?> toJson() => _$ClientStateToJson(this);
factory ClientState.fromJson(Map<String, Object?> json) =>
_$ClientStateFromJson(json);
}