XKeyboard.test constructor

  1. @visibleForTesting
XKeyboard.test({
  1. required double nativeHeight(),
  2. int isTracking()?,
  3. double animTarget()?,
  4. double animDuration()?,
  5. int animGen()?,
  6. double devicePixelRatio = 1.0,
})

A keyboard with injected native readers — under flutter test the FFI symbols never resolve, so instance cannot exercise the frame loop. Registers no frame callback; drive it with debugFrame.

Implementation

@visibleForTesting
XKeyboard.test({
  required double Function() nativeHeight,
  int Function()? isTracking,
  double Function()? animTarget,
  double Function()? animDuration,
  int Function()? animGen,
  double devicePixelRatio = 1.0,
}) : _readHeight = nativeHeight,
     _readIsTracking = isTracking,
     _readAnimTarget = animTarget,
     _readAnimDuration = animDuration,
     _readAnimGen = animGen,
     _debugDevicePixelRatio = devicePixelRatio;