initParams method
Implementation
Future<void> initParams() async {
_state = EffectsState.loading;
print("width is ${widget.viewWidth}, height is ${widget.viewHeight}");
if (widget.viewWidth != 0 && widget.viewHeight != 0 && _particle.isEmpty) {
count = 200;
// var widthRatio = ScreenUtil.defaultSize.width / 392.0;
// var heightRatio = ScreenUtil.defaultSize.height / 817;
for (int i = 0; i < count; i++) {
int imageIndex = Random().nextInt(4);
var effectBirthdayOneParams = EffectBirthdayOneParams(
widget.viewWidth, widget.viewHeight, _images[imageIndex]);
effectBirthdayOneParams.init(/*widthRatio, heightRatio*/);
_particle.add(effectBirthdayOneParams);
}
}
_controller?.forward();
_state = EffectsState.finish;
}