toJsonWithId method

Map<String, dynamic> toJsonWithId()
inherited

toJson method with id

Implementation

Map<String, dynamic> toJsonWithId() {
  final body = getAttributes.map((key, value) =>
      MapEntry(key, getIt<DynamicAttributes>().toJson(key, value)))
    ..remove('key');
  return {
    'id': id,
    'type': type,
    'name': name,
    'description': description,
    'parent_id': parentID,
    'properties': body,
    'rect_properties': rectPropertiesToJson(),
    'updated_at': updatedAt.toIso8601String(),
    'child_order': childOrder,
    'component_id': componentID,
    'is_locked': isLocked,
  };
}