This commit is contained in:
Yegor Vialov
2020-05-03 10:30:51 +00:00
parent e9ad612fec
commit 5bc0b0868a
8 changed files with 155 additions and 137 deletions

View File

@ -152,6 +152,7 @@ part 'entities/media_player/widgets/media_player_seek_bar.widget.dart';
part 'entities/media_player/widgets/media_player_progress_bar.widget.dart';
part 'pages/whats_new.page.dart';
part 'pages/fullscreen.page.dart';
part 'popups.dart';
EventBus eventBus = new EventBus();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
@ -236,10 +237,12 @@ class _HAClientAppState extends State<HAClientApp> {
void _handlePurchaseUpdates(purchase) {
if (purchase is List<PurchaseDetails>) {
if (purchase[0].status == PurchaseStatus.purchased) {
eventBus.fire(ShowPopupMessageEvent(
eventBus.fire(ShowPopupEvent(
Popup(
title: "Thanks a lot!",
body: "Thank you for supporting HA Client development!",
buttonText: "Ok"
positiveText: "Ok"
)
));
} else {
Logger.d("Purchase change handler: ${purchase[0].status}");