diegoveloper / flutter_percent_indicator

Flutter percent indicator library
BSD 2-Clause "Simplified" License
679 stars 206 forks source link

Not working well when placed in ExpansionTile #124

Closed jeffpena closed 2 years ago

jeffpena commented 3 years ago

Children of ExpansionTile flickering when trying to hide it by pressing the arrow button. This only happens when there are multiple indicator widget and any other widget like Text, Sizedbox etc.

ExpansionTile(
                      title: Text('Test'),
                      children: [
                        LinearPercentIndicator(
                          lineHeight: 30.0,
                          center: Text(
                            "80%",
                            style: TextStyle(fontWeight: FontWeight.bold),
                          ),
                          percent: 0.8,
                          linearStrokeCap: LinearStrokeCap.butt,
                          backgroundColor: Colors.grey[400],
                          progressColor: Theme.of(context).accentColor,
                        ),
                        Text('Sample'),
                        LinearPercentIndicator(
                          lineHeight: 30.0,
                          center: Text(
                            "80%",
                            style: TextStyle(fontWeight: FontWeight.bold),
                          ),
                          percent: 0.8,
                          linearStrokeCap: LinearStrokeCap.butt,
                          backgroundColor: Colors.grey[400],
                          progressColor: Theme.of(context).accentColor,
                        ),
                      ],
                    ),

https://user-images.githubusercontent.com/72001433/133109238-7ef4441c-1353-48dc-bba1-e371976acf98.mp4

diegoveloper commented 3 years ago

Can you add a minimum sample code to run and reproduce the issue?

A gif/video would be helpful too.

On Mon, Sep 13, 2021, 4:39 AM jeffpena @.***> wrote:

Children of ExpansionTile flickering when trying to hide it by pressing the arrow button. This only happens when there are multiple indicator widget and any other widget like Text, Sizedbox etc.

ExpansionTile( title: Text('Test'), children: [ LinearPercentIndicator( lineHeight: 30.0, center: Text( "80%", style: TextStyle(fontWeight: FontWeight.bold), ), percent: 0.8, linearStrokeCap: LinearStrokeCap.butt, backgroundColor: Colors.grey[400], progressColor: Theme.of(context).accentColor, ), Text('Sample'), LinearPercentIndicator( lineHeight: 30.0, center: Text( "80%", style: TextStyle(fontWeight: FontWeight.bold), ), percent: 0.8, linearStrokeCap: LinearStrokeCap.butt, backgroundColor: Colors.grey[400], progressColor: Theme.of(context).accentColor, ), ], ),

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter_percent_indicator/issues/124, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFL3UGWR7X7I6PYLV5OPB3UBXBD3ANCNFSM5D5MWFGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jeffpena commented 3 years ago

Can you add a minimum sample code to run and reproduce the issue? A gif/video would be helpful too.

I uploaded a video since converting it to gif will make the flickering not noticeable. Btw I'm using version 2.1.9+1

diegoveloper commented 3 years ago

Did you try on iOS? I don't see the issue https://user-images.githubusercontent.com/4898256/133115140-c1517c1d-5a63-4bcd-9dc2-8fee2bf4ed4a.mov

      body: Center(
        child: SingleChildScrollView(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ExpansionTile(
                title: Text('Test'),
                children: [
                  LinearPercentIndicator(
                    lineHeight: 30.0,
                    center: Text(
                      "80%",
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                    percent: 0.8,
                    linearStrokeCap: LinearStrokeCap.butt,
                    backgroundColor: Colors.grey[400],
                    progressColor: Theme.of(context).accentColor,
                  ),
                  Text('Sample'),
                  LinearPercentIndicator(
                    lineHeight: 30.0,
                    center: Text(
                      "80%",
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                    percent: 0.8,
                    linearStrokeCap: LinearStrokeCap.butt,
                    backgroundColor: Colors.grey[400],
                    progressColor: Theme.of(context).accentColor,
                  ),
                ],
              ),
diegoveloper commented 3 years ago

use the latest version.