* fix: fix dart formatting for CI * fix: sorted imports, updated deprecated flutter functions * fix: format files * fix: format files * feat: replace syncfusion flutter package with excel flutter package * fix: don't run enable google services patch in CI * fix: update iOS supported platforms for enable ios build script * fix: commented out linux build in integrate CI
24 lines
701 B
Dart
24 lines
701 B
Dart
import 'package:matrix/matrix.dart';
|
|
|
|
import 'package:fluffychat/pangea/models/analytics/constructs_model.dart';
|
|
import '../../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;
|
|
}
|
|
}
|