leafContainerWrapping method
Implementation
Widget leafContainerWrapping({Key? key, Color? editModeColor, List<Widget>? children, required String leafName, Size? literalAspectRatio, String? extra, required BuildContext context}){
// ketchupDebug('widgetsBuilder:${widget.widgetsBuilder}');
Size leafSize = screen.debug?.gKeyMappedValues[leafName]?.$2?.size ?? size;
return editModeGridWrapping(singlePT: leafName, child: Container(
key: key,
width: double.infinity,
decoration: BoxDecoration(
color: screen.mode == RUNMODE.edit ? editModeColor : null,
border: screen.mode != RUNMODE.runtime && editModeColor != null ? Border.all(color: editModeColor) : null,
// color: Colors.black,
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
... (){
final screenPT = (extra ?? leafName, screen.currentPattern);
final columnsBuild = widget.columnsBuilder(context, this, screenPT);
buildDebug('#$hashCode-columnsBuild$screenPT-$columnsBuild');
return columnsBuild ?? [];
}(),
// ... (buildDebug(widget.columnsBuilder(context, this, (extra ?? leafName, screen.currentPattern))) ?? []),
if(screen.mode == RUNMODE.debug)
Text(' ${leafSize.width.toStringAsFixed(2)}x${leafSize.height.toStringAsFixed(2)}(${leafSize.aspectRatio.toStringAsFixed(4)})', style: TextStyle(fontSize: vmin(2)(size), color: Colors.white, backgroundColor: Colors.black)),
if(screen.mode == RUNMODE.edit)
AutoSizeText( extra ?? leafName , presetFontSizes: [160, 570], maxLines: 2, style:TextStyle(color: editModeColor?.kDarken(0.8))),
]
// ..addAll(
// widget.mode != RUNMODE.runtime && screen.gKeyMappedValues.containsKey(leafName) ?
// [Column(
// children: [
// RightText(screen.gKeyMappedValues[leafName]!.$2.toString()),
// literalAspectRatio != null ?
// RightText('aspectRadioSet ${literalAspectRatio.aspectRatio.toStringAsFixed(6)}(${literalAspectRatio.width} : ${literalAspectRatio.height})') :
// RightText('aspectRadioSet null'),
// RightText('tailColumnExpand ${widget.tailColumnExpand}'),
// RightText('aspectRadioCal ${screen.gKeyMappedValues[leafName]!.$2!.aspectRatio.toStringAsFixed(6)}'),
// RightText('= 9.0 : ${(9.0 / screen.gKeyMappedValues[leafName]!.$2!.aspectRatio).toStringAsFixed(2)} =16.0 : ${(16.0 / screen.gKeyMappedValues[leafName]!.$2!.aspectRatio).toStringAsFixed(2)}'),
// RightText(screen.gKeyMappedValues[leafName]!.$3.toString()),
// ],
// )] :[])
)));
}