Map<String, dynamic> toJson() => { 'position': position, if (items != null) 'items': items!.map((e) => e!.toJson()).toList() };