map abstract method

void map(
  1. Pattern uri,
  2. Object? handler, {
  3. bool preceding = false,
})

Maps the given URI to the given handler.

The interpretation of uri and handler is really up to the implementation of Router.

Please refer to DefaultRouter.map for how it handles the regular expressions.

  • uri - a pattern, either String or RegExp.
  • handler - if handler is null, it means removal.
  • preceding - whether to make the mapping preceding any previous mappings. In other words, if true, this mapping will be interpreted first.

Implementation

void map(Pattern uri, Object? handler, {bool preceding = false});