getOrFail method

Member getOrFail(
  1. String id, {
  2. String? error,
})

Implementation

Member getOrFail(String id, {String? error}) =>
    _members.values.firstWhere((element) => element.id.value == id,
        orElse: () => throw error ?? 'Member not found');