showKeyBoard static method

dynamic showKeyBoard(
  1. BuildContext context, {
  2. dynamic onOkPress(
    1. String
    )?,
  3. dynamic onChange(
    1. String
    )?,
  4. bool withOKButton = true,
  5. int maxIntegerLength = 8,
})

打开键盘

Implementation

static showKeyBoard(
  BuildContext context, {
  Function(String)? onOkPress,
  Function(String)? onChange,
  bool withOKButton = true,
  int maxIntegerLength = 8,
}) {
  if (null == _overlayEntry) {
    _overlayEntry = OverlayEntry(builder: (context) {
      return Positioned(
        bottom: 0,
        child: WiseDigitalKeyboard(
          onChange: onChange,
          onOkPress: onOkPress,
          withOKButton: withOKButton,
          maxIntegerLength: maxIntegerLength,
        ),
      );
    });
    Overlay.of(context)!.insert(_overlayEntry!);
  }
}