IntPathParam class final

A path parameter accessor that parses values as int.

Use this for integer-only path parameters like IDs or counts.

Example:

const idParam = IntPathParam(#id);
router.get('/users/:id', (req) {
  final id = req.pathParameters.get(idParam);
  return Response.ok();
});
Inheritance

Constructors

IntPathParam(Symbol key)
const

Properties

decode → Decoder<int, RawPathParam>
Decodes the raw value into the typed value.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
key → Symbol
The key used to identify this value in storage.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited