パッケージ、リポジトリ、アプリカテゴリを検索

flutter_secure_keyboard のカバー
パッケージ詳細v4.0.0

flutter_secure_keyboard

キーロガー攻撃や画面キャプチャを防ぐモバイルセキュアキーボード。

AndroidiOS
30日間ダウンロード
113
いいね数
35
Pub ポイント
130

パッケージをインストール

flutter pub add flutter_secure_keyboard

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutter Secure Keyboard は、モバイルデバイス上のユーザー入力をキーロガー攻撃や画面キャプチャから保護するように設計されたFlutterパッケージです。パスワードやPINなど、機密性の高い入力を傍受または記録されないように、セキュアなキーボードインターフェースを提供します。セキュリティを最優先に設計されており、AndroidおよびiOSのプラットフォーム固有の機能を活用して、入力中のデータが機密性を保つようにしています。銀行アプリや認証システムなど、高い入力セキュリティを必要とするアプリケーションに最適です。

用途

  • セキュアなパスワード入力
  • PIN入力保護
  • 認証フロー
  • 画面録画の防止
  • キーロギングの軽減
  • 機密データ入力

主な機能

  • 画面のキャプチャを防ぐ
  • キーロガー攻撃に耐性があります
  • プラットフォームネイティブなセキュリティ
  • 隔離された入力処理
  • クロスプラットフォーム対応(Android および iOS)
  • pub add を通じた簡単な統合

適している対象

  • 金融アプリケーション
  • 認証システム
  • プライバシーに配慮したアプリ
  • エンタープライズモバイルソリューション
  • 機密資格情報を扱うアプリ

注意事項

  • 使いやすさのために慎重なUIデザインが必要です
  • アクセシビリティ機能に影響を与える可能性があります
  • カスタマイズオプションが限られている
  • プラットフォームレベルのセキュリティに依存する
  • 完全な暗号化の代わりにはなりません
  • 古いデバイスでのパフォーマンスのオーバーヘッド

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Mobile secure keyboard to prevent KeyLogger attack and screen capture.

pub package

Screenshots

Alphanumeric Numeric

Getting started

To use this plugin, add flutter_secure_keyboard as a dependency in your pubspec.yaml file. For example:

dependencies:
  flutter_secure_keyboard: ^4.0.0

Examples

class WithSecureKeyboardExample extends StatefulWidget {
  @override
  _WithSecureKeyboardExampleState createState() =>
      _WithSecureKeyboardExampleState();
}

class _WithSecureKeyboardExampleState extends State<WithSecureKeyboardExample> {
  final _secureKeyboardController = SecureKeyboardController();

  final _passwordEditor = TextEditingController();
  final _passwordTextFieldFocusNode = FocusNode();

  final _pinCodeEditor = TextEditingController();
  final _pinCodeTextFieldFocusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    // Set the WithSecureKeyboard widget as the top-level widget
    // in the build function so that the secure keyboard works properly.
    return WithSecureKeyboard(
      controller: _secureKeyboardController,
      child: Scaffold(
        appBar: AppBar(
          title: Text('flutter_secure_keyboard'),
        ),
        body: _buildContentView(),
      ),
    );
  }

  Widget _buildContentView() {
    // We recommend using the ListView widget to prevent widget overflow.
    return ListView(
      padding: const EdgeInsets.all(8.0),
      children: [
        _buildPasswordTextField(),
        SizedBox(height: 12.0),
        _buildPinCodeTextField(),
      ],
    );
  }

  Widget _buildPasswordTextField() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Text('Password'),
        TextFormField(
          controller: _passwordEditor,
          focusNode: _passwordTextFieldFocusNode,
          // We recommended to set false to prevent the software keyboard from opening.
          enableInteractiveSelection: false,
          obscureText: true,
          onTap: () {
            _secureKeyboardController.show(
              type: SecureKeyboardType.ALPHA_NUMERIC,
              focusNode: _passwordTextFieldFocusNode,
              initText: _passwordEditor.text,
              hintText: 'password',
              // Use onCharCodesChanged to have text entered in real time.
              onCharCodesChanged: (List<int> charCodes) {
                _passwordEditor.text = String.fromCharCodes(charCodes);
              },
            );
          },
        ),
      ],
    );
  }

  Widget _buildPinCodeTextField() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Text('PinCode'),
        TextFormField(
          controller: _pinCodeEditor,
          focusNode: _pinCodeTextFieldFocusNode,
          // We recommended to set false to prevent the software keyboard from opening.
          enableInteractiveSelection: false,
          obscureText: true,
          onTap: () {
            _secureKeyboardController.show(
              type: SecureKeyboardType.NUMERIC,
              focusNode: _pinCodeTextFieldFocusNode,
              initText: _pinCodeEditor.text,
              hintText: 'pinCode',
              // Use onDoneKeyPressed to allow text to be entered when you press the done key,
              // or to do something like encryption.
              onDoneKeyPressed: (List<int> charCodes) {
                _pinCodeEditor.text = String.fromCharCodes(charCodes);
              },
            );
          },
        ),
      ],
    );
  }

  @override
  void dispose() {
    super.dispose();
    _secureKeyboardController.dispose();
    _passwordEditor.dispose();
    _pinCodeEditor.dispose();
  }
}

Package

  • WithSecureKeyboard - A widget that implements a secure keyboard with controller.
  • SecureKeyboardController - Controller to check or control the state of the secure keyboard.

Note: The parameters marked with an asterisk(*) are required.

WithSecureKeyboard
Parameter Description
controller* Controller to control the secure keyboard.
child* A child widget with a secure keyboard.
keyboardHeight The height of the keyboard.
Default value is 280.0.
keyRadius The radius of the keyboard key.
Default value is 4.0.
keySpacing The spacing between keyboard keys.
Default value is 1.2.
keyInputMonitorPadding The padding of the key input monitor.
Default value is const EdgeInsets.only(left: 10.0, right: 5.0).
keyboardPadding The padding of the keyboard.
Default value is const EdgeInsets.symmetric(horizontal: 5.0).
backgroundColor The background color of the keyboard.
Default value is const Color(0xFF0A0A0A).
stringKeyColor The color of the string key(alphanumeric, numeric..).
Default value is const Color(0xFF313131).
actionKeyColor The color of the action key(shift, backspace, clear..).
Default value is const Color(0xFF222222).
doneKeyColor The color of the done key.
Default value is const Color(0xFF1C7CDC).
activatedKeyColor The key color when the shift action key is activated. If the value is null, doneKeyColor is used.
keyTextStyle The text style of the text inside the keyboard key.
Default value is const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500).
inputTextStyle The text style of the text inside the key input monitor.
Default value is const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500).
SecureKeyboardController
Function Description
isShowing Whether the secure keyboard is showing.
show Show secure keyboard.
hide Hide secure keyboard.
SecureKeyboardController.show()
Parameter Description
type* The type of the secure keyboard.
focusNode The FocusNode that will receive focus on.
initText The initial value of the input text.
hintText The hint text to display when the input text is empty.
inputTextLengthSymbol The symbol to use when displaying the input text length.
doneKeyText The text of the done key.
clearKeyText The text of the clear key.
obscuringCharacter The secure character to hide the input text.
Default value is •.
maxLength The maximum length of text that can be entered.
alwaysCaps Whether to always display uppercase characters.
Default value is false.
obscureText Whether to hide input text as secure characters.
Default value is true.
shuffleNumericKey Whether to shuffle the position of the numeric keys.
Default value is true.
hideKeyInputMonitor Whether to hide the key input monitor.
Default value is false.
disableKeyBubble Whether to disable the key bubble.
Default value is false.
onKeyPressed Called when the key is pressed.
onCharCodesChanged Called when the character codes changed.
onDoneKeyPressed Called when the done key is pressed.
onCloseKeyPressed Called when the close key is pressed.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。