Info class abstract
Represents the metadata about the API.
- Available extensions
- Annotations
-
- @Freezed.new(copyWith: true, fromJson: true, toJson: true, toStringOverride: true)
Constructors
-
Info({required String title, required String version, String? description, String? termsOfService, Contact? contact, License? license, String? summary, @JsonKey.new(includeIfNull: false, includeFromJson: false, includeToJson: false) Map<
String, dynamic> ? extensions}) -
Creates an instance of Info.
constfactory
-
Info.fromJson(Map<
String, dynamic> json) -
Converts this Info object to a JSON map.
factory
Properties
- contact → Contact?
-
The contact information for the API.
no setterinherited
-
copyWith
→ $InfoCopyWith<
Info> -
Create a copy of Info
with the given fields replaced by the non-null parameter values.
no setterinherited
- description → String?
-
A short description of the API.
no setterinherited
-
extensions
→ Map<
String, dynamic> ? -
Vendor extensions (keys like
x-*).no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- license → License?
-
The license information for the API.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- summary → String?
-
A short summary of the API.
no setterinherited
- termsOfService → String?
-
A URL to the API's terms of service.
no setterinherited
- title → String
-
The title of the API.
no setterinherited
- version → String
-
The version of the API.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Info value)) → TResult -
Available on Info, provided by the InfoPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Info value)?) → TResult? -
Available on Info, provided by the InfoPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Info value)?, {required TResult orElse()}) → TResult -
Available on Info, provided by the InfoPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String title, String version, String? description, String? termsOfService, Contact? contact, License? license, String? summary, Map< String, dynamic> ? extensions)?, {required TResult orElse()}) → TResult -
Available on Info, provided by the InfoPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this Info object to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String title, String version, String? description, String? termsOfService, Contact? contact, License? license, String? summary, Map< String, dynamic> ? extensions)) → TResult -
Available on Info, provided by the InfoPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String title, String version, String? description, String? termsOfService, Contact? contact, License? license, String? summary, Map< String, dynamic> ? extensions)?) → TResult? -
Available on Info, provided by the InfoPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited