BarrageWall constructor

BarrageWall({
  1. List<Bullet>? bullets,
  2. BarrageWallController? controller,
  3. ValueNotifier<BarrageValue>? timelineNotifier,
  4. int speed = 5,
  5. required Widget child,
  6. double? width,
  7. double? height,
  8. bool massiveMode = false,
  9. double maxBulletHeight = 16,
  10. bool debug = false,
  11. int safeBottomHeight = 0,
  12. int speedCorrectionInMilliseconds = 3000,
})

Implementation

BarrageWall({
  List<Bullet>? bullets,
  BarrageWallController? controller,
  ValueNotifier<BarrageValue>? timelineNotifier,
  this.speed = 5,
  required this.child,
  this.width,
  this.height,
  this.massiveMode = false,
  this.maxBulletHeight = 16,
  this.debug = false,
  this.safeBottomHeight = 0,
  this.speedCorrectionInMilliseconds = 3000,
})  : controller = controller ??
          BarrageWallController.withBarrages(bullets,
              timelineNotifier: timelineNotifier),
      selfCreatedController = controller == null {
  if (controller != null) {
    this.controller.value = controller.value.size == 0
        ? BarrageWallValue.fromList(bullets ?? [])
        : controller.value;
    this.controller.timelineNotifier =
        controller.timelineNotifier ?? timelineNotifier;
  }
}