* 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
29 lines
915 B
Dart
29 lines
915 B
Dart
import 'package:sentry_flutter/sentry_flutter.dart';
|
|
|
|
import 'package:fluffychat/pangea/models/base_subscription_info.dart';
|
|
import 'package:fluffychat/pangea/repo/subscription_repo.dart';
|
|
|
|
class WebSubscriptionInfo extends CurrentSubscriptionInfo {
|
|
WebSubscriptionInfo({
|
|
required super.userID,
|
|
required super.availableSubscriptionInfo,
|
|
});
|
|
|
|
@override
|
|
Future<void> setCurrentSubscription() async {
|
|
if (currentSubscriptionId != null) return;
|
|
final rcResponse = await SubscriptionRepo.getCurrentSubscriptionInfo(
|
|
userID,
|
|
availableSubscriptionInfo.allProducts,
|
|
);
|
|
|
|
currentSubscriptionId = rcResponse.currentSubscriptionId;
|
|
expirationDate = rcResponse.expirationDate;
|
|
|
|
if (currentSubscriptionId != null && currentSubscription == null) {
|
|
Sentry.addBreadcrumb(
|
|
Breadcrumb(message: "mismatch of productIds and currentSubscriptionID"),
|
|
);
|
|
}
|
|
}
|
|
}
|