Block.fromJson constructor
Block.fromJson(
- dynamic json
Implementation
Block.fromJson(dynamic json) {
_key = json['key'];
_text = json['text'];
_type = json['type'];
_depth = json['depth'];
if (json['inlineStyleRanges'] != null) {
_inlineStyleRanges = [];
json['inlineStyleRanges'].forEach((v) {
_inlineStyleRanges?.add(InlineStyle.fromJson(v));
});
}
if (json['entityRanges'] != null) {
_entityRanges = [];
json['entityRanges'].forEach((v) {
_entityRanges?.add(EntityRange.fromJson(v));
});
}
if (json['data'] != null) {
_data = Data.fromJson(json['data']);
}
}