New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
widgetIndicator issues #102
Comments
Add minimum code to reproduce the issue |
The sample code:
_myImagesWidget is statelesswidget including:
|
Use code that I could run on my local. Minimum sample code. |
|
Hi @diegoveloper I created the sample code which you can see in previous post. greyhoundrunner_green.png size is height: 26, width: 68 pixels in 1x resolution when you run the app at first the widgetIndicator (image) won't be displayed but if you hot reload you can see it is displayed but with wrong alignment. |
I tried using |
As I mentioned before the size of my image is height: 26, width: 68 pixels in 1x resolution, also I attached the image previously. So, the issue is still there basically, It should b able to recieve any widget in widgetIndicator. |
Thanks @aboo for the clue. Solved the first time load image and image alignment issues by adding width, height and translation to the container as below: var indicator = Container(
width: 58,
height: 24,
transform: Matrix4.translationValues(0, -6, 0),
child: Image.asset('resources/images/greyhoundrunner_green.png'),
); and then the usage in the LinearPercentIndicator(
padding: const EdgeInsets.all(0.0),
isRTL: false,
animation: true,
lineHeight: 8.0,
curve: Curves.fastOutSlowIn,
animationDuration: 1000,
percent: 50 / 100,
progressColor: Colors.green,
backgroundColor: Colors.white.withOpacity(0.10),
linearStrokeCap: LinearStrokeCap.roundAll,
widgetIndicator: indicator,
), |
Hello,
I am trying to add my widget as widgetIndicator in the LinearPercentIndicator widget but I see two issues:
1- In the first load after running the app it won't show my widgetIndicator and it just shown the animated line.
2- After loading the page for second time it will display my widgetIndicator but with wrong alignment, vertical alignment is not centered aligned with the line.
Note: my widgetIndicator is a statelessWidget including a Stack of three Image.asset .
Please advise.
Thanks
The text was updated successfully, but these errors were encountered: