stack method

T stack({
  1. AlignmentGeometry? alignment,
  2. TextDirection? textDirection,
  3. StackFit? fit,
  4. Clip? clipBehavior,
})

Set layout type to stack with optional direct Flutter API access

Implementation

T stack({
  AlignmentGeometry? alignment,
  TextDirection? textDirection,
  StackFit? fit,
  Clip? clipBehavior,
}) {
  if (alignment != null ||
      textDirection != null ||
      fit != null ||
      clipBehavior != null) {
    // Use direct Flutter API access
    return copyWith(
      flyStyle.copyWith(
        layoutType: 'stack',
        stack: StackParams(
          alignment: alignment,
          textDirection: textDirection,
          fit: fit,
          clipBehavior: clipBehavior,
        ),
      ),
    );
  } else {
    // Use utility method (no parameters)
    return copyWith(flyStyle.copyWith(layoutType: 'stack'));
  }
}