checkReward method

  1. @override
Future<String?> checkReward()
override

Checks for rewards and returns the reward value and conversions.

This method returns a String? representing the reward, which will be null if there is no reward.

Throws an UnimplementedError if the platform-specific implementation has not been provided.

Implementation

@override
Future<String?> checkReward() async {
  try {
    final checkReward =
        await methodChannel.invokeMethod<String>('checkReward');
    return checkReward;
  } on PlatformException {
    rethrow;
  } catch (e) {
    throw PlatformException(
        code: 'CHECK_REWARD_ERROR', message: 'Failed to check reward: $e');
  }
}