rewardedButton static method
Implementation
static ElevatedButton rewardedButton(String title, void Function() onPressed,
{IconData icon = Icons.star, Color color = Colors.blue}) {
return ElevatedButton.icon(
style: ElevatedButton.styleFrom(backgroundColor: color),
onPressed: () {
AdmobHelper.showRewarded();
onPressed();
},
icon: Icon(icon),
label: Column(
children: [
Text(title, style: TextStyle(fontSize: 17)),
if (!PurchaseHelper.isPremium) ...{
Text('Watch ad'.tr, style: TextStyle(fontSize: 11)),
SizedBox(height: 5)
},
],
),
);
}