(node: SceneNode, child: string)
| 143 | }; |
| 144 | |
| 145 | const flutterContainer = (node: SceneNode, child: string): string => { |
| 146 | let propChild = ""; |
| 147 | |
| 148 | if ("fills" in node && retrieveTopFill(node.fills)?.type === "IMAGE") { |
| 149 | addWarning("Image fills are replaced with placeholders"); |
| 150 | } |
| 151 | |
| 152 | if (child.length > 0) { |
| 153 | propChild = child; |
| 154 | } |
| 155 | |
| 156 | const builder = new FlutterDefaultBuilder(propChild) |
| 157 | .createContainer(node) |
| 158 | .blendAttr(node) |
| 159 | .position(node); |
| 160 | |
| 161 | return builder.child; |
| 162 | }; |
| 163 | |
| 164 | const flutterText = (node: TextNode): string => { |
| 165 | const builder = new FlutterTextBuilder().createText(node); |
no test coverage detected