toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final map = super.toJson();
  if (actions != null && actions!.isNotEmpty) {
    final props = <String, dynamic>{};
    map["actions"] = props;
    for (var key in actions!.keys) {
      props[key] = actions![key]!.getValueType();
    }
  }
  if (widgets != null && widgets!.isNotEmpty) {
    final props = <String, dynamic>{};
    map["widgets"] = props;
    for (var key in widgets!.keys) {
      props[key] = widgets![key]!.getValueType();
    }
  }
  if (tags != null && tags!.isNotEmpty) {
    map["tags"] = tags;
  }
  return map;
}