VectorPathCommand.fromJson constructor

VectorPathCommand.fromJson(
  1. Map<String, dynamic> json
)

Parses whichever VectorPathCommand subtype the JSON describes.

Implementation

factory VectorPathCommand.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is VectorPathCommand
      ? object
      : UndecodedVectorPathCommand(json);
}