Router constructor

Router({
  1. Object? metadata,
  2. int? bodyLimit,
  3. void onError(
    1. Object error,
    2. StackTrace stack
    )?,
})

Creates an empty router.

bodyLimit and onError are read from the outermost router only, since both describe how the whole application behaves.

Implementation

Router({
  Object? metadata,
  int? bodyLimit,
  void Function(Object error, StackTrace stack)? onError,
}) : this._(
        prefix: '',
        metadata: metadata,
        bodyLimit: bodyLimit ?? defaultBodyLimit,
        onError: onError,
      );