WebAppData class abstract

Describes data sent from a Web App to the bot.

Available extensions
Annotations
  • @freezed

Constructors

WebAppData({@JsonKey.new(name: 'data') required String data, @JsonKey.new(name: 'button_text') required String buttonText})
Constructs a WebAppData object
const
factory
WebAppData.fromJson(Map<String, dynamic> json)
Creates a WebAppData object from JSON object
factory

Properties

buttonText String
Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.
no setterinherited
copyWith → $WebAppDataCopyWith<WebAppData>
Create a copy of WebAppData with the given fields replaced by the non-null parameter values.
no setterinherited
data String
The data. Be aware that a bad client can send arbitrary data in this field.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_WebAppData value)) → TResult

Available on WebAppData, provided by the WebAppDataPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_WebAppData value)?) → TResult?

Available on WebAppData, provided by the WebAppDataPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_WebAppData value)?, {required TResult orElse()}) → TResult

Available on WebAppData, provided by the WebAppDataPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this WebAppData to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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