isOperator method Null safety

bool isOperator(
  1. String userId
)

Returns true if a given user with userId is operator

Implementation

bool isOperator(String userId) {
  return operators.where((e) => e.userId == userId).isNotEmpty;
}