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

number_pad_keyboard のカバー
パッケージ詳細v0.0.6

number_pad_keyboard

PINコードや数値入力用にカスタマイズ可能な数字パッドキーボードを提供するFlutterパッケージです。数字およびボタンのカスタムスタイル機能を備えています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
52
いいね数
90
Pub ポイント
160

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

flutter pub add number_pad_keyboard

パッケージ概要

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

PINコードや数値入力用に設計されたカスタマイズ可能な数字パッドキーボードを提供するFlutterパッケージです。開発者は数字やボタンの外観をカスタムスタイルで調整でき、プラットフォーム間での一貫した見た目を確保できます。モバイルおよびデスクトップ環境向けに最適化されており、Android、iOS、Web、macOS、Windows、Linuxをサポートしています。認証フロー、決済入力、またはセキュアな数値入力が必要なあらゆるシナリオに最適です。

用途

  • PINコード入力
  • セキュアな数値入力
  • 支払いフォームフィールド
  • 認証画面
  • ユーザーIDの検証
  • デジタルキーパッドインターフェース

主な機能

  • カスタマイズ可能なボタンスタイル
  • クロスプラットフォーム互換性
  • PIN コードに焦点を当てたデザイン
  • 設定可能な数字レイアウト
  • 応答性のあるUIコンポーネント
  • TextFormField との簡単な統合

適している対象

  • モバイルアプリ開発者
  • Webアプリケーション作成者
  • デスクトップアプリのビルドツール
  • セキュリティを重視したアプリケーション
  • 数値入力が必要なフォーム

注意事項

  • 数値入力のみに制限
  • 組み込みの検証なし
  • 入力イベントの手動処理が必要です
  • テキスト入力には適していません
  • ダークモード用に追加のスタイリングが必要になる場合があります

元の README

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

Number Pad Keyboard

A Flutter package that provides a customizable number pad keyboard widget for entering PIN codes or numeric input.

Features

  • Customizable Design: Easily customize the look and feel of the number pad keyboard.
  • PIN Code Entry: Suitable for entering PIN codes or any numeric input in Flutter applications.
  • Flexible Usage: Integrate seamlessly into any Flutter project requiring a numeric keyboard interface.

Installation

Add the following dependency to your pubspec.yaml file:

dependencies:
  number_pad_keyboard: ^1.0.0

Importing

To use the Number Pad Keyboard widget in your Flutter project, import it as follows:

import 'package:number_pad_keyboard/number_pad_keyboard.dart';

Example


import 'package:flutter/material.dart';
import 'package:number_pad_keyboard/number_pad_keyboard.dart';

void main() {
  runApp(
    const MyApp(),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Number Pad Keyboard Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final TextEditingController _textController = TextEditingController();

  void _addDigit(int digit) {
    if (_textController.text.length < 10) {
      setState(() {
        _textController.text = _textController.text + digit.toString();
      });
    }
  }

  void _backspace() {
    if (_textController.text.isNotEmpty) {
      setState(() {
        _textController.text =
            _textController.text.substring(0, _textController.text.length - 1);
      });
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Number Pad Keyboard Example'),
      ),
      body: SizedBox(
        width: double.infinity,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.end,
          children: <Widget>[
            Padding(
              padding: const EdgeInsets.all(20.0),
              child: TextFormField(
                controller: _textController,
                decoration: const InputDecoration(
                  border: OutlineInputBorder(),
                  labelText: 'PIN Code',
                ),
                readOnly: true,
                textAlign: TextAlign.center,
                style: const TextStyle(fontSize: 24.0),
              ),
            ),

            const SizedBox(height: 200.0,),

            NumberPadKeyboard(
              addDigit: _addDigit,
              backspace: _backspace,
              enterButtonText: 'ENTER',
              onEnter: () {
                debugPrint('PIN Code: ${_textController.text}');
              },
            ),
          ],
        ),
      ),
    );
  }
}

カテゴリー

ソースリポジトリ

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

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