BodyPart class

Automatically generate a Map of all @BodyPart and used as Body. This is a useful when a request body is very simple and you don't wanna define a Request Model.

  • Enum and Object(toJson) are currently not supported.
  • Should not use both of @Body and @BodyPart. eg: (@BodyPart("userId") String id, @BodyPart() String name) => {"userId":"$id", "name": "$name"}
Annotations
  • @immutable

Constructors

BodyPart([String? key])
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key String?
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