StorySpacing.fromJson constructor
StorySpacing.fromJson(
- Map json
Implementation
StorySpacing.fromJson(Map<dynamic, dynamic> json) {
if (json['padding'] != null) {
padding = EdgeInsets.only(
top: toDouble(json['padding']['top']) ?? 0.0,
bottom: toDouble(json['padding']['bottom']) ?? 0.0,
left: toDouble(json['padding']['left']) ?? 0.0,
right: toDouble(json['padding']['right']) ?? 0.0,
);
}
if (json['margin'] != null) {
margin = EdgeInsets.only(
top: toDouble(json['margin']['top']) ?? 0.0,
bottom: toDouble(json['margin']['bottom']) ?? 0.0,
left: toDouble(json['margin']['left']) ?? 0.0,
right: toDouble(json['margin']['right']) ?? 0.0,
);
}
}