matchSegment function

bool matchSegment(
  1. Map<String, Object?> segment,
  2. Map<String, Object?> ctx, [
  3. Map<String, Object?> segments = const {}
])

Whether ctx is in segment (matchSegment of the TypeScript engine).

Implementation

bool matchSegment(Map<String, Object?> segment, Map<String, Object?> ctx, [Map<String, Object?> segments = const {}]) =>
    _matchAll(jsGet(segment, 'match'), jsGet(segment, 'conditions'), ctx, segments, 1);