TJEarnedCurrencyAlertHandler typedef Null safety

TJEarnedCurrencyAlertHandler = void Function(String? currencyName, int? earnedAmount, String? error)

EarnedCurrencyAlertHandler returns String currencyName, int amount, String error In order to notify users that they’ve earned virtual currency since the last time the app queried the user’s currency balance, if function is successful , error is null if function fails, currencyName & amount are null

Implementation

typedef void TJEarnedCurrencyAlertHandler(
    String? currencyName, int? earnedAmount, String? error);