Segment constructor

const Segment({
  1. required String directory,
  2. String? handler,
  3. String? middleware,
  4. required Map<String, Segment> methodSegments,
  5. required Map<String, String> paramsMiddleware,
  6. SegmentConfiguration? configuration,
  7. required Iterable<Segment> children,
})

Create a new path segment.

Implementation

const factory Segment({
  required String directory,
  String? handler,
  String? middleware,
  required Map<String, Segment> methodSegments,
  required Map<String, String> paramsMiddleware,
  SegmentConfiguration? configuration,
  required Iterable<Segment> children,
}) = _Segment;