MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / flutterContainer

Function flutterContainer

packages/backend/src/flutter/flutterMain.ts:145–162  ·  view source on GitHub ↗
(node: SceneNode, child: string)

Source from the content-addressed store, hash-verified

143};
144
145const 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
164const flutterText = (node: TextNode): string => {
165 const builder = new FlutterTextBuilder().createText(node);

Callers 3

flutterWidgetGeneratorFunction · 0.70
flutterGroupFunction · 0.70
flutterFrameFunction · 0.70

Calls 5

retrieveTopFillFunction · 0.90
addWarningFunction · 0.90
positionMethod · 0.45
blendAttrMethod · 0.45
createContainerMethod · 0.45

Tested by

no test coverage detected