(child: RNListItem)
| 36 | this.appendChild(child); |
| 37 | } |
| 38 | appendChild(child: RNListItem): void { |
| 39 | if (!this.layout()) { |
| 40 | this.setLayout(new FlexLayout()); |
| 41 | } |
| 42 | |
| 43 | if (!(child instanceof RNListItem)) { |
| 44 | throw new Error("Children of list should be of type ListItem"); |
| 45 | } |
| 46 | |
| 47 | this.addItem(child); |
| 48 | if (child.actualListItemWidget) { |
| 49 | child.setSizeHint(child.actualListItemWidget.size()); |
| 50 | this.setItemWidget(child, child.actualListItemWidget); |
| 51 | } |
| 52 | } |
| 53 | insertBefore(child: RNListItem, beforeChild: RNListItem): void { |
| 54 | const row = this.row(beforeChild); |
| 55 | this.insertItem(row, child); |
no test coverage detected