GKController constructor

GKController({
  1. required TickerProvider vsync,
  2. Duration? duration = const Duration(seconds: 1),
  3. GKPlayMode playMode = GKPlayMode.forward,
  4. double intensity = 1.0,
})

Creates a GKController.

vsync is required and typically provided by a TickerProviderStateMixin. duration defaults to 1 second if not specified. playMode determines the animation playback behavior. intensity sets the initial effect intensity (0.0 to 1.0).

Implementation

GKController({
  required super.vsync,
  super.duration = const Duration(seconds: 1),
  GKPlayMode playMode = GKPlayMode.forward,
  double intensity = 1.0,
})  : _playMode = playMode,
      _intensity = intensity.clamp(0.0, 1.0),
      _startTime = DateTime.now();