My widget looks like this in 2.0.2:
AvatarGlow(
glowColor: const Color.fromARGB(255,69, 4,129),
endRadius: 50.0,
duration: const Duration(milliseconds: 2000),
repeat: true,
showTwoGlows:true,
animate: false,
startDelay: const Duration( milliseconds: 100),
child: InkWell(
child: SizedBox(
width: min(70 * chargingStationController.ratio.value, 70 / chargingStationController.scaleValue.value),
height: min(70 * chargingStationController.ratio.value, 70 / chargingStationController.scaleValue.value),
child: Stack(children: [
const CustomSvgAsset( menuSvgPath.backgroundMap, ),
CustomSvgAsset( getIcon(spaceMap.spaceUse), color: getColor(spaceMap), ),
], )),
onTap: () {})),
So basically it's an AvatarGlow with SvgPicture.asset (from 'package:flutter_svg/flutter_svg.dart') as child.
When animate is set to false, it shows "only" the svg without any painting around it.
When animate is set to true, it shows the svg with the expected glow effect.
Now, in 3.0.1, my widget looked like this :
AvatarGlow(
glowColor: const Color.fromARGB(255,69, 4,129),
duration: const Duration(milliseconds: 2000),
repeat: true,
glowCount:2,
animate: false,
child: InkWell(
child: SizedBox(
width: min(70 * chargingStationController.ratio.value, 70 / chargingStationController.scaleValue.value),
height: min(70 * chargingStationController.ratio.value, 70 / chargingStationController.scaleValue.value),
child: Stack(children: [
const CustomSvgAsset( menuSvgPath.backgroundMap, ),
CustomSvgAsset( getIcon(spaceMap.spaceUse), color: getColor(spaceMap), ),
], )),
onTap: () {})),
Now, when animate is set to false, it shows the svg with a circle around it painted in glowColor.
When animate is set to true, it shows the svg with the expected glow effect.
Another issue with 3.0.1 is that destroys the position of the widget when put in Stack.
In fact, my main widget is a constrained InteractiveViewer with Center as child, then Stack with background image as a first child and then X Positionned widget with AvatarGlow as child. In 2.0.2 the widget are displayed at the expected position. In 3.0.1 there are not anymore. I could maybe dive more into it to make it work but that mean i would have to refactor a lot and don't have much time, so i keep 2.0.2 for now.
SizedBox(child :
InteractiveViewer(child :
Center(child:
Stack(children : [
Image(),
Positionned(child:AvatarGlow(....)),
Positionned(child:AvatarGlow(....)),
Positionned(child:AvatarGlow(....)),
])
)
)
)
First image (on left) is 2.0.2
Second image (on right) is 3.0.1
Same AvatarGlow are animated, you can see the Widget are not on the good position.
Non animated AvatarGlow have a static circle painted around it.
I think my case is really special with the positionned thing. But the circle painted when non animated should touch more user.
Originally posted by @Fourchettedev in #21 (comment)