Route constructor

Route({
  1. required Method method,
  2. required String path,
  3. List<Callback> middleware = const [],
  4. Callback? callback,
})

Implementation

Route({
  required this.method,
  required this.path,
  this.middleware = const [],
  this.callback,
})  : stack = [...middleware, if (callback != null) callback],
      matcher = _matcher(path);