premium_activated_controller.dart 614 Bytes
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';

class PremiumActivatedController extends GetxController {
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onClose() {
    super.onClose();
  }

  void executeBackLogic(BuildContext context) {
    _navigateNext();
  }

  void executeContinueLogic(BuildContext context) {
    _navigateNext();
  }

  void _navigateNext() {
    if (Get.key.currentState?.canPop() ?? false) {
      Get.back();
    } else {
      Get.offAllNamed(AppRoutes.home);
    }
  }
}