搜索插件、代码仓与 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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。