搜索插件、代码仓与 APP 分类

插件详情v1.0.8

input_with_keyboard_control

该包提供了一个输入框,您可以控制键盘是否显示,而不会丢失焦点,非常适合与条形码扫描仪一起使用!

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
502
喜欢数
35
Pub 分数
150

安装插件

flutter pub add input_with_keyboard_control

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,可实现对键盘可见性的精确控制,使开发者能够管理键盘何时显示或保持隐藏,而不会丢失焦点。非常适合条形码扫描等场景,这些场景中不希望自动显示键盘。该包支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保在各种设备上行为一致。通过程序化控制键盘行为,同时保持焦点,提供无缝的用户体验。

适合场景

  • 条形码扫描器集成
  • 表单输入框不自动弹出键盘
  • 移动设备上的自定义输入处理
  • 多平台输入控制
  • 全屏模式下的焦点管理

主要特点

  • 可编程键盘可见性
  • 在键盘控制期间保持焦点
  • 跨平台兼容性
  • 键盘切换的简单 API
  • 支持所有主要的Flutter平台

适合对象

  • 开发条形码扫描应用的开发者
  • 需要手动键盘控制的应用程序
  • 自助服务终端或销售点系统
  • 具有自定义输入逻辑的移动优先应用程序
  • 跨平台表单实现

使用建议

  • 需要仔细处理焦点状态
  • 可能需要为键盘反馈增加额外的用户体验设计
  • 不适合标准文本输入工作流程
  • 仅限输入字段使用场景
  • 依赖于平台特定的键盘行为

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

input_with_keyboard_control

The package provides an input that you can control whether the keyboard will show or not without losing focus, ideal for use with a barcode scanner!

Example


Check example folder for code sample



Usage


  1. Follow the install guide

  1. Import the library:
import 'package:input_with_keyboard_control/input_with_keyboard_control.dart';

  1. Add InputWithKeyboardControl widget in your code as in the example below
InputWithKeyboardControl(
  focusNode: InputWithKeyboardControlFocusNode(),
  onSubmitted: (value) {
    print(value);
  },
  autofocus: true,
  controller: TextEditingController(),
  width: 300,
  startShowKeyboard: false,
  buttonColorEnabled: Colors.blue,
  buttonColorDisabled: Colors.black,
  underlineColor: Colors.black,
  showUnderline: true,
  showButton: true,
)



Thank you for using this package :heart:


所属分类

源码仓库

使用此插件的项目

暂无相关数据。