MapSpec class final

Specification for map/dictionary types.

Inheritance

Constructors

MapSpec({required TypeSpec keyType, required TypeSpec valueType, String? description, bool nullable = false, List<Object>? examples, bool isDeprecated = false})
Creates a new MapSpec.
const

Properties

description → String?
Optional description of this type.
finalinherited
examples → List<Object>?
Example values for documentation.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isDeprecated → bool
Whether this type is deprecated.
finalinherited
keyType → TypeSpec
The type specification for map keys.
final
nullable → bool
Whether this type accepts null values.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
valueType → TypeSpec
The type specification for map values.
final

Methods

asNullable() → MapSpec
Creates a copy of this spec with nullable set to true.
override
copyWith({TypeSpec? keyType, TypeSpec? valueType, String? description, bool? nullable, List<Object>? examples, bool? isDeprecated}) → MapSpec
Creates a copy with the given modifications.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withDescription(String description) → MapSpec
Creates a copy of this spec with the given description.
override

Operators

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