RichBlock.map constructor
const
RichBlock.map({
- @JsonKey.new(name: 'type') @Default.new(RichBlockType.map) RichBlockType type,
- @JsonKey.new(name: 'location') required Location location,
- @JsonKey.new(name: 'zoom') required int zoom,
- @JsonKey.new(name: 'width') required int width,
- @JsonKey.new(name: 'height') required int height,
- @JsonKey.new(name: 'caption') RichBlockCaption? caption,
A block with a map, corresponding to the custom HTML tag <tg-map>.
Implementation
const factory RichBlock.map({
/// Type of the block, always "map"
@JsonKey(name: 'type') @Default(RichBlockType.map) RichBlockType type,
/// Location of the center of the map
@JsonKey(name: 'location') required Location location,
/// Map zoom level; 13-20
@JsonKey(name: 'zoom') required int zoom,
/// Expected width of the map
@JsonKey(name: 'width') required int width,
/// Expected height of the map
@JsonKey(name: 'height') required int height,
/// Optional. Caption of the block
@JsonKey(name: 'caption') RichBlockCaption? caption,
}) = RichBlockMap;