premiumCard static method

Widget premiumCard({
  1. Color bgColor = Colors.black,
})

Implementation

static Widget premiumCard({Color bgColor = Colors.black}) {
  if (PurchaseHelper.NO_PURCHASE_ANDROID && isAndroid) {
    return const SizedBox();
  }

  if (!PurchaseHelper.isPremium) {
    return const SizedBox();
  }
  return Container(
    height: 120,
    width: double.infinity,
    decoration: BoxDecoration(
      color: bgColor, // Change card color to dark
      borderRadius: BorderRadius.circular(16),
      boxShadow: [
        BoxShadow(
          color: Colors.grey.withOpacity(0.3),
          blurRadius: 5,
          offset: const Offset(0, 3),
        ),
      ],
    ),
    child: Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        SizedBox(width: 16),
        Icon(Icons.star, color: Colors.yellow, size: 48),
        SizedBox(width: 16),
        Expanded(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                "Premium",
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                  color: Colors.white, // Change text color to white
                ),
              ),
              SizedBox(height: 8),
              Text(
                "premiumuse".tr, // Assuming .tr is your translation function
                style: TextStyle(
                  fontSize: 14,
                  color: Colors.white70,
                ),
              ),
            ],
          ),
        ),
        SizedBox(width: 16),
      ],
    ),
  );
}