* feat(morphs): repo for getting lang-specific list of morphs * integrated repo into use of morph features and tags * generated * merged with previous push * generated * generated * chore: fix .env file path --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com> Co-authored-by: ggurdin <ggurdin@gmail.com>
24 lines
703 B
Dart
24 lines
703 B
Dart
import 'package:matrix/matrix.dart';
|
|
|
|
import 'package:fluffychat/pangea/analytics_misc/constructs_model.dart';
|
|
import '../events/constants/pangea_event_types.dart';
|
|
|
|
class ConstructAnalyticsEvent {
|
|
late Event _event;
|
|
ConstructAnalyticsModel? contentCache;
|
|
ConstructAnalyticsEvent({required Event event}) {
|
|
_event = event;
|
|
if (event.type != PangeaEventTypes.construct) {
|
|
throw Exception(
|
|
"${event.type} should not be used to make a ConstructAnalyticsEvent",
|
|
);
|
|
}
|
|
}
|
|
|
|
Event get event => _event;
|
|
|
|
ConstructAnalyticsModel get content {
|
|
contentCache ??= ConstructAnalyticsModel.fromJson(event.content);
|
|
return contentCache as ConstructAnalyticsModel;
|
|
}
|
|
}
|