Skip to content

Stepper doesn't let's childs update their state ? #22033

Closed
@Nik99

Description

@Nik99

Hi everyone.
I'm trying to make a stepper with star rating inside every step, but while the values changes, the UI does not. It seems like it's not refreshing the content.

The plugin for rating is this: https://pub.dartlang.org/packages/flutter_rating

This is my test code:

double rating = 0.0;

List<Step> questions = [
      Step(
          content: StarRating(
              rating: rating,
              color: Colors.orange,
              borderColor: Colors.grey,
              size: 50.0,
              starCount: 5,
              onRatingChanged: (rating) => setState(() {
                    this.rating = rating;
                  })),
          title: Text('XX')),
     ]

If i take it outside of the stepper, it works and refreshes it self nicely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions