isSubscibred static method

bool isSubscibred(
  1. MemberModel? member,
  2. AppModel app
)

Implementation

static bool isSubscibred(MemberModel? member, AppModel app) {
  if (member == null) return false;
  if (member.subscriptions == null) return false;
  // if (member.subscriptions.length == 0) return false;

  var matches = member.subscriptions!.where((subscription) =>
      subscription.app != null
          ? subscription.app!.documentID == app.documentID
          : false);
  return matches.isNotEmpty;
}