ApiParams class

Query parameters appended to the request URL.

// Simple key/value params: ?page=1&limit=20
ApiParams.simple({'page': '1', 'limit': '20'})

// Multi-value params: ?tags=flutter&tags=dart
ApiParams(multiQuery: {'tags': ['flutter', 'dart']})

// Combined
ApiParams(
  query: {'page': '1'},
  multiQuery: {'tags': ['flutter', 'dart']},
)

Constructors

ApiParams({Map<String, String>? query, Map<String, List<String>>? multiQuery})
Creates an ApiParams with optional query and multiQuery maps.
const
ApiParams.simple(Map<String, String> params)
Convenience constructor for a simple flat map of query parameters.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
multiQuery Map<String, List<String>>?
Multi-value query parameters where one key maps to multiple values.
final
query Map<String, String>?
Simple key→value query parameters.
final
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