isExactlyScope method

bool isExactlyScope(
  1. AuthScope scope
)

Whether or not two scopes are exactly the same.

Implementation

bool isExactlyScope(AuthScope scope) {
  final incomingIterator = scope._segments.iterator;
  for (var segment in _segments) {
    if(!incomingIterator.moveNext()){
      return false;
    }
    final incomingSegment = incomingIterator.current;
    // if (incomingSegment == null) {
    //   return false;
    // }

    if (incomingSegment.name != segment.name ||
        incomingSegment.modifier != segment.modifier) {
      return false;
    }
  }

  return true;
}