{"id":14971536,"url":"https://github.com/dev-hwang/flutter_secure_keyboard","last_synced_at":"2025-10-26T16:30:45.901Z","repository":{"id":56830170,"uuid":"325221130","full_name":"Dev-hwang/flutter_secure_keyboard","owner":"Dev-hwang","description":"Mobile secure keyboard to prevent KeyLogger attack and screen capture.","archived":false,"fork":false,"pushed_at":"2024-06-10T06:53:24.000Z","size":90,"stargazers_count":29,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T21:11:29.328Z","etag":null,"topics":["android","flutter","ios","secure-keyboard","virtual-keyboard"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_secure_keyboard","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dev-hwang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-29T07:46:22.000Z","updated_at":"2024-10-18T04:13:19.000Z","dependencies_parsed_at":"2024-06-10T08:50:18.896Z","dependency_job_id":null,"html_url":"https://github.com/Dev-hwang/flutter_secure_keyboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_secure_keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_secure_keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_secure_keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_secure_keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dev-hwang","download_url":"https://codeload.github.com/Dev-hwang/flutter_secure_keyboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238366717,"owners_count":19460172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","flutter","ios","secure-keyboard","virtual-keyboard"],"created_at":"2024-09-24T13:45:20.809Z","updated_at":"2025-10-26T16:30:45.529Z","avatar_url":"https://github.com/Dev-hwang.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mobile secure keyboard to prevent KeyLogger attack and screen capture.\n\n[![pub package](https://img.shields.io/pub/v/flutter_secure_keyboard.svg)](https://pub.dev/packages/flutter_secure_keyboard)\n\n## Screenshots\n| Alphanumeric                                                                                                                  | Numeric                                                                                                                       |\n|-------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| \u003cimg src=\"https://user-images.githubusercontent.com/47127353/111059243-52fbc980-84d7-11eb-9260-01b6b7b5909c.png\" width=\"200\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/47127353/111059256-7888d300-84d7-11eb-8797-89a69337d8ad.png\" width=\"200\"\u003e |\n\n## Getting started\n\nTo use this plugin, add `flutter_secure_keyboard` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). For example:\n\n```yaml\ndependencies:\n  flutter_secure_keyboard: ^4.0.0\n```\n\n## Examples\n\n```dart\nclass WithSecureKeyboardExample extends StatefulWidget {\n  @override\n  _WithSecureKeyboardExampleState createState() =\u003e\n      _WithSecureKeyboardExampleState();\n}\n\nclass _WithSecureKeyboardExampleState extends State\u003cWithSecureKeyboardExample\u003e {\n  final _secureKeyboardController = SecureKeyboardController();\n\n  final _passwordEditor = TextEditingController();\n  final _passwordTextFieldFocusNode = FocusNode();\n\n  final _pinCodeEditor = TextEditingController();\n  final _pinCodeTextFieldFocusNode = FocusNode();\n\n  @override\n  Widget build(BuildContext context) {\n    // Set the WithSecureKeyboard widget as the top-level widget\n    // in the build function so that the secure keyboard works properly.\n    return WithSecureKeyboard(\n      controller: _secureKeyboardController,\n      child: Scaffold(\n        appBar: AppBar(\n          title: Text('flutter_secure_keyboard'),\n        ),\n        body: _buildContentView(),\n      ),\n    );\n  }\n\n  Widget _buildContentView() {\n    // We recommend using the ListView widget to prevent widget overflow.\n    return ListView(\n      padding: const EdgeInsets.all(8.0),\n      children: [\n        _buildPasswordTextField(),\n        SizedBox(height: 12.0),\n        _buildPinCodeTextField(),\n      ],\n    );\n  }\n\n  Widget _buildPasswordTextField() {\n    return Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        Text('Password'),\n        TextFormField(\n          controller: _passwordEditor,\n          focusNode: _passwordTextFieldFocusNode,\n          // We recommended to set false to prevent the software keyboard from opening.\n          enableInteractiveSelection: false,\n          obscureText: true,\n          onTap: () {\n            _secureKeyboardController.show(\n              type: SecureKeyboardType.ALPHA_NUMERIC,\n              focusNode: _passwordTextFieldFocusNode,\n              initText: _passwordEditor.text,\n              hintText: 'password',\n              // Use onCharCodesChanged to have text entered in real time.\n              onCharCodesChanged: (List\u003cint\u003e charCodes) {\n                _passwordEditor.text = String.fromCharCodes(charCodes);\n              },\n            );\n          },\n        ),\n      ],\n    );\n  }\n\n  Widget _buildPinCodeTextField() {\n    return Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        Text('PinCode'),\n        TextFormField(\n          controller: _pinCodeEditor,\n          focusNode: _pinCodeTextFieldFocusNode,\n          // We recommended to set false to prevent the software keyboard from opening.\n          enableInteractiveSelection: false,\n          obscureText: true,\n          onTap: () {\n            _secureKeyboardController.show(\n              type: SecureKeyboardType.NUMERIC,\n              focusNode: _pinCodeTextFieldFocusNode,\n              initText: _pinCodeEditor.text,\n              hintText: 'pinCode',\n              // Use onDoneKeyPressed to allow text to be entered when you press the done key,\n              // or to do something like encryption.\n              onDoneKeyPressed: (List\u003cint\u003e charCodes) {\n                _pinCodeEditor.text = String.fromCharCodes(charCodes);\n              },\n            );\n          },\n        ),\n      ],\n    );\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n    _secureKeyboardController.dispose();\n    _passwordEditor.dispose();\n    _pinCodeEditor.dispose();\n  }\n}\n```\n\n## Package\n\n* **WithSecureKeyboard** - A widget that implements a secure keyboard with controller.\n* **SecureKeyboardController** - Controller to check or control the state of the secure keyboard.\n\n**Note:** The parameters marked with an asterisk(*) are required.\n\n### WithSecureKeyboard\n\n| Parameter | Description |\n|---|---|\n| `controller`* | Controller to control the secure keyboard. |\n| `child`* | A child widget with a secure keyboard. |\n| `keyboardHeight` | The height of the keyboard. \u003cbr\u003e Default value is `280.0`. |\n| `keyRadius` | The radius of the keyboard key. \u003cbr\u003e Default value is `4.0`. |\n| `keySpacing` | The spacing between keyboard keys. \u003cbr\u003e Default value is `1.2`. |\n| `keyInputMonitorPadding` | The padding of the key input monitor. \u003cbr\u003e Default value is `const EdgeInsets.only(left: 10.0, right: 5.0)`. |\n| `keyboardPadding` | The padding of the keyboard. \u003cbr\u003e Default value is `const EdgeInsets.symmetric(horizontal: 5.0)`. |\n| `backgroundColor` | The background color of the keyboard. \u003cbr\u003e Default value is `const Color(0xFF0A0A0A)`. |\n| `stringKeyColor` | The color of the string key(alphanumeric, numeric..). \u003cbr\u003e Default value is `const Color(0xFF313131)`. |\n| `actionKeyColor` | The color of the action key(shift, backspace, clear..). \u003cbr\u003e Default value is `const Color(0xFF222222)`. |\n| `doneKeyColor` | The color of the done key. \u003cbr\u003e Default value is `const Color(0xFF1C7CDC)`. |\n| `activatedKeyColor` | The key color when the shift action key is activated. If the value is null, `doneKeyColor` is used. |\n| `keyTextStyle` | The text style of the text inside the keyboard key. \u003cbr\u003e Default value is `const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500)`. |\n| `inputTextStyle` | The text style of the text inside the key input monitor. \u003cbr\u003e Default value is `const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500)`. |\n\n### SecureKeyboardController\n\n| Function | Description |\n|---|---|\n| `isShowing` | Whether the secure keyboard is showing. |\n| `show` | Show secure keyboard. |\n| `hide` | Hide secure keyboard. |\n\n### SecureKeyboardController.show()\n\n| Parameter | Description |\n|---|---|\n| `type`* | The type of the secure keyboard. |\n| `focusNode` | The `FocusNode` that will receive focus on. |\n| `initText` | The initial value of the input text. |\n| `hintText` | The hint text to display when the input text is empty. |\n| `inputTextLengthSymbol` | The symbol to use when displaying the input text length. |\n| `doneKeyText` | The text of the done key. |\n| `clearKeyText` | The text of the clear key. |\n| `obscuringCharacter` | The secure character to hide the input text. \u003cbr\u003e Default value is `•`. |\n| `maxLength` | The maximum length of text that can be entered. |\n| `alwaysCaps` | Whether to always display uppercase characters. \u003cbr\u003e Default value is `false`. |\n| `obscureText` | Whether to hide input text as secure characters. \u003cbr\u003e Default value is `true`. |\n| `shuffleNumericKey` | Whether to shuffle the position of the numeric keys. \u003cbr\u003e Default value is `true`. |\n| `hideKeyInputMonitor` | Whether to hide the key input monitor. \u003cbr\u003e Default value is `false`. |\n| `disableKeyBubble` | Whether to disable the key bubble. \u003cbr\u003e Default value is `false`. |\n| `onKeyPressed` | Called when the key is pressed. |\n| `onCharCodesChanged` | Called when the character codes changed. |\n| `onDoneKeyPressed` | Called when the done key is pressed. |\n| `onCloseKeyPressed` | Called when the close key is pressed. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-hwang%2Fflutter_secure_keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-hwang%2Fflutter_secure_keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-hwang%2Fflutter_secure_keyboard/lists"}