dvStudioPlaceSource function

String dvStudioPlaceSource(
  1. Map<String, Object?> properties,
  2. String source
)

The exported form of dvStudioPlace: source wrapped where the child says it sits.

Implementation

String dvStudioPlaceSource(Map<String, Object?> properties, String source) {
  if (!dvStudioIsPlaced(properties)) return source;
  final List<String> named = <String>[
    for (final String edge in dvStudioPlacementEdges)
      if (properties[edge] is num)
        '$edge: ${(properties[edge]! as num).toDouble()}',
  ];
  return 'Positioned(${named.join(', ')}, child: $source)';
}