TF-3985 Navigate Paywall url when click Increase your space button

This commit is contained in:
dab246
2025-09-09 15:33:50 +07:00
committed by Dat H. Pham
parent c3ee166c00
commit f373cd3d37
22 changed files with 463 additions and 5 deletions
@@ -0,0 +1,21 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:dartz/dartz.dart';
import 'package:tmail_ui_user/features/paywall/domain/repository/paywall_repository.dart';
import 'package:tmail_ui_user/features/paywall/domain/state/get_paywall_url_state.dart';
class GetPaywallUrlInteractor {
final PaywallRepository _paywallRepository;
GetPaywallUrlInteractor(this._paywallRepository);
Stream<Either<Failure, Success>> execute(String baseUrl) async* {
try {
yield Right(GettingPaywallUrl());
final paywallUrl = await _paywallRepository.getPaywallUrl(baseUrl);
yield Right(GetPaywallUrlSuccess(paywallUrl));
} catch (e) {
yield Left(GetPaywallUrlFailure(e));
}
}
}