GKWidget constructor

const GKWidget({
  1. Key? key,
  2. required GKEffect effect,
  3. GKTrigger trigger = GKTrigger.auto,
  4. bool interactive = false,
  5. Widget? child,
  6. GKController? controller,
  7. Duration duration = const Duration(seconds: 2),
})

Creates a GKWidget.

effect is the visual effect to render. trigger controls when the animation starts (defaults to GKTrigger.auto). interactive enables pointer tracking when true. child is an optional widget rendered beneath the effect. controller allows supplying an external controller; if null, one is created internally. duration sets the animation duration (defaults to 2 seconds).

Implementation

const GKWidget({
  super.key,
  required this.effect,
  this.trigger = GKTrigger.auto,
  this.interactive = false,
  this.child,
  this.controller,
  this.duration = const Duration(seconds: 2),
});