搜尋套件、儲存庫與 APP 分類

numpad_layout 封面
套件詳情v0.0.3

numpad_layout

一個全新的 Flutter 套件,用於數字鍵盤,支援靈活的自訂以及阿拉伯數字支援,還有更多功能。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
349
喜歡數
24
Pub 分數
160

安裝套件

flutter pub add numpad_layout

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

numpad_layout 是一個 Flutter 套件,提供可自訂的數字鍵盤,支援阿拉伯數字及跨平台相容性。它讓開發者能輕鬆在 Android、iOS、Web、macOS、Windows 和 Linux 上整合具有彈性樣式與佈局選項的數字輸入欄位。此套件非常適合需要輸入數字的表單,例如 PIN 輸入、計算機或付款系統。其直覺式設計允許輕鬆自訂按鈕大小、顏色與行為。

適用情境

  • PIN 輸入表單
  • 計算器應用程式
  • 支付輸入欄位
  • 資料輸入介面
  • 多語言數字輸入

主要特色

  • 阿拉伯數字支援
  • 跨平台相容性
  • 可自訂的按鈕樣式
  • 靈活的佈局選項
  • 與 TextFormField 的輕鬆整合
  • 響應式設計

適合對象

  • 開發數值輸入介面的開發者
  • 針對阿拉伯語使用者的應用
  • 多平台應用程式
  • 表單密集型 UI
  • 自定鍵盤實作

使用建議

  • 需要手動處理輸入驗證
  • 僅限數字輸入
  • 可能需要額外的樣式來支援複雜主題
  • 不適用於全文輸入
  • 依賴外部相依性以實現進階功能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Numpad

an numeric Keyboard Layout supports english and arabic digits

Features

  • Documented:** each property has a code documentation
  • Languages:** supports English and Arabic Digits
  • Flexibility:** smooth and flexible to modify anything

Usage

Parameter Default Description
onType required Callback when number pressed .
mainAxisAlignment MainAxisAlignment.spaceBetween for spacing horizontal .
padding horizontal = 30 padding over the whole layout .
leftWidget null the widget at the left of the 0 .
rightWidget null the widget at the right of the 0 .
highlightColor Color(0xFFC9C9C9) on Holding press any number.
runSpace 40 spacing vertical .
numberStyle null custom number style
radius 45 radius for the shape of the number .
arabicDigits false Displays arabic digits if equal true
returnItAsEnglish false it returns the digits as english even it's arabic digits .
Example
 NumPad(
   arabicDigits: true,
   onType: (value) {
     number += value;
     setState(() {});
   },
   rightWidget: IconButton(
   icon: const Icon(Icons.backspace),
   onPressed: () {
   if (number.isNotEmpty) {
     number = number.substring(0, number.length - 1);
      setState(() {});
   }
   },
  ),
);

also you can find The sample code under the example package.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。