Drupal 9 Views Template Twig if statement for boolean fields

I don't know why this isn't any where on the web... Or at least that I could find.

I needed my block to show an image at full width if the editor selected it and another display if the editor did not select it.

For this to work you need to make sure your boolean field is set to "1/0" in two places.  The content type Fields Display section and in your view in the field.

{% if fields.field_image_fullwidth.content |striptags|trim == '1' %}

         <div id="sponsor-box-container">
            <div class="full-sponsor-box-image">
            {{ fields.field_ad_preview_image.content }}
            </div>

        </div>

        {% else %}

    <div id="sponsor-box-container">
        <div class="sponsor-box-image">
        {{ fields.field_ad_preview_image.content }}
        </div>
    <div class="sponsor-box-ad-text">
        <p class="sponsored-text">SPONSORED</p>
        <h3>{{ fields.field_ad_title.content }}</h3>
        {{ fields.field_teaser_text.content }}

    </div>

</div>

{% endif %}

Blog Type: