BackgroundFill.fromJson constructor

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

Parses whichever BackgroundFill subtype the JSON describes.

Implementation

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