KeyHelper constructor

  1. @Deprecated('No longer supported. ' 'This feature was deprecated after v3.18.0-2.0.pre.')
KeyHelper(
  1. String toolkit
)

Create a KeyHelper implementation depending on the given toolkit.

Implementation

@Deprecated(
  'No longer supported. '
  'This feature was deprecated after v3.18.0-2.0.pre.',
)
factory KeyHelper(String toolkit) {
  if (toolkit == 'glfw') {
    return GLFWKeyHelper();
  } else if (toolkit == 'gtk') {
    return GtkKeyHelper();
  } else {
    throw FlutterError('Window toolkit not recognized: $toolkit');
  }
}