HapticPeriodic constructor

HapticPeriodic({
  1. required Sdl sdl,
  2. required HapticPeriodicType type,
  3. required HapticDirection direction,
  4. required int length,
  5. required int delay,
  6. required int button,
  7. required int interval,
  8. required int period,
  9. required int magnitude,
  10. required int offset,
  11. required int phase,
  12. required int attackLength,
  13. required int attackLevel,
  14. required int fadeLength,
  15. required int fadeLevel,
})

Create an instance.

Implementation

HapticPeriodic({
  required final Sdl sdl,
  required this.type,
  required this.direction,
  required this.length,
  required this.delay,
  required this.button,
  required this.interval,
  required this.period,
  required this.magnitude,
  required this.offset,
  required this.phase,
  required this.attackLength,
  required this.attackLevel,
  required this.fadeLength,
  required this.fadeLevel,
}) : super(sdl) {
  sdl.loadHapticDirection(direction);
  handle.ref
    ..type = type.toInt()
    ..periodic.type = type.toInt();
  handle.ref.periodic
    ..direction = sdl.hapticDirectionPointer.ref
    ..length = length
    ..delay = delay
    ..button = button
    ..interval = interval
    ..period = period
    ..magnitude = magnitude
    ..offset = offset
    ..phase = phase
    ..attack_length = attackLength
    ..attack_level = attackLevel
    ..fade_length = fadeLength
    ..fade_level = fadeLevel;
}