MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / indentStringFlutter

Function indentStringFlutter

packages/backend/src/common/indentString.ts:12–23  ·  view source on GitHub ↗
(
  str: string,
  indentLevel: number = 2,
)

Source from the content-addressed store, hash-verified

10};
11
12export const indentStringFlutter = (
13 str: string,
14 indentLevel: number = 2,
15): string => {
16 // const options = {
17 // includeEmptyLines: false,
18 // };
19
20 // const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
21 const regex = /^(?!\s*$)/gm;
22 return str.replace(regex, " ".repeat(indentLevel));
23};

Callers 2

flutterShadowFunction · 0.90
generateWidgetCodeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected