getCloseReason method

  1. @override
Future<EntitySubscriptionCloseReason?> getCloseReason(
  1. String subscriptionId
)
override

Implementation

@override
Future<EntitySubscriptionCloseReason?> getCloseReason(String subscriptionId) async {
  final res = await _methodChannel.invokeMethod<String>(
      'getCloseReason',
      {
        "subscriptionId": subscriptionId
      }
  );
  if (res == null) throw AssertionError("received null result from platform method getEvent");
  final decodedRes = jsonDecode(res);
  return decodedRes == null ? null : EntitySubscriptionCloseReason.fromJSON(decodedRes);
}