FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
115 stars 19 forks source link

Cannot generate StickyHeader headers #3514

Closed FlamboD closed 1 month ago

FlamboD commented 1 month ago

Can we access your project?

Current Behavior

When using the StickyHeader widget to generate children and using those children to set the headers, the build fails when I try to run test mode.

Looking at the generated code, the variable being used within the header has the wrong variable name.

Builder(
    builder: (context) {
                // The variable name generated here is ranStr
        final ranStr = List.generate(
            random_data.randomInteger(5, 10),
            (index) => random_data.randomString(
                  3,
                  8,
                  true,
                  true,
                  false,
                )).toList();

        return StickyHeader(
          overlapHeaders: false,
          header: Container(
            width: double.infinity,
            height: 50,
            decoration: BoxDecoration(
              color: FlutterFlowTheme.of(context).primaryBackground,
            ),
            alignment: AlignmentDirectional(-1, 0),
            child: Align(
              alignment: AlignmentDirectional(-1, 0),
              child: Padding(
                padding:
                    EdgeInsetsDirectional.fromSTEB(16, 0, 0, 0),
                child: Text(
                  ranStrItem, // The variable used here is ranStrItem
                  style: FlutterFlowTheme.of(context)
                      .titleLarge
                      .override(
                        fontFamily: 'Outfit',
                        letterSpacing: 0,
                      ),
                ),
              ),
            ),
          ),
...

Here is the settings I used to generate the children image

Expected Behavior

The StickyHeader should generate children using the data provided, and test mode should be able to run afterwards.

Steps to Reproduce

1) Create a new page 2) Add a Scrollable Column 3) Add a Sticky Header within the column 4) Set the sticky header to generate children from a list of strings (generating children using any list causes the same problem) 5) Set the heading of the sticky header to the child generated 6) Click run

Reproducible from Blank

Bug Report Code (Required)

ITESz/Hqx89gos8D1br1YMZqhQIgQ0QnU7gnlO1ucx40GLbsBJoUdc+kT0NKT8CqfwhAGFCj/T4C+vyOkeOSJPknEzSec4hS0JVAbQKUTlG7WpiIPLu8Yn97J+VhfEDG4Z2joglQWfF1LUIt3GC1Nq3qNleeY8aSfxBlZ7vfcPo=

Visual documentation

image image

Environment

- FlutterFlow version: v4.1.7.8+
- Platform: Web
- Browser name and version: Chrome Version 127.0.6533.73 (Official Build) (64-bit)
- Operating system and version affected: Windows 7

Additional Information

No response

Alezanello commented 1 month ago

Hello!

I wasn't able to replicate the issue; it seems to be working fine on my end. I'll share the public project link for you to check and see if I missed anything.

Here is the link: QA-1587 Project

Best regards,
Azanello

Alezanello commented 1 month ago

Closing this issue since we haven't heard back from you. If you are still facing the problem please submit a new issue. Have a great day!