GamepadSource constructor

GamepadSource({
  1. GamepadBackend? backend,
  2. GamepadNormalizer? normalizer,
  3. HidGamepadBackend? hid,
  4. Duration pollInterval = const Duration(seconds: 1),
  5. bool hidFallback = true,
})

A source over backend (default the gamepads package).

Implementation

GamepadSource({
  GamepadBackend? backend,
  pads.GamepadNormalizer? normalizer,
  HidGamepadBackend? hid,
  this.pollInterval = const Duration(seconds: 1),
  this.hidFallback = true,
}) : _backend = backend ?? const GamepadsPackageBackend(),
     _normalizer = normalizer ?? pads.GamepadNormalizer(),
     _hid = hid ?? createHidGamepadBackend();