IP Address Input Keypad

A lightweight, premium custom inline numeric keypad and text field designed for seamless IPv4 address entry in Flutter applications.

This package suppresses the native OS keyboard entirely, bypassing cross-platform numeric keyboard limitations (such as the missing decimal point in certain iOS and Android locales/languages) and optimizing space constraints on mobile and custom landscape form factors (like small controller displays).

Features

  • No Native Keyboard: Bypasses locale-specific keyboard issues on iOS/Android entirely.
  • Smart Validation: Validates octet values in real-time ($\le 255$) and prevents starting with dots, double dots, or exceeding 3 dots.
  • Auto-Formatting: Automatically appends a dot . when a 3-digit octet is completed, making typing fast and smooth.
  • Adaptive Layout: Fits beautifully on both portrait phones and landscape displays using MediaQuery sizing.
  • Haptic Feedback: Integrates system haptic feedback (HapticFeedback.lightImpact() and mediumImpact()) out of the box.
  • Quick Actions: Includes an optional quick action trigger for local access point setup IP address (10.0.0.1).

Getting Started

Add ip_address_keypad to your pubspec.yaml file:

dependencies:
  ip_address_keypad: ^1.0.0

Import it in your Dart code:

import 'package:ip_address_keypad/ip_address_keypad.dart';

Usage

Simply drop IpAddressInput anywhere in your widget tree:

IpAddressInput(
  hintText: '10.0.0.1',
  initialValue: '192.168.1',
  showApModeButton: true, // Toggle the quick-link AP mode button (defaults to true)
  apModeIpAddress: '192.168.4.1', // Custom IP address for the AP mode button (defaults to '10.0.0.1')
  onCompleted: (String ip) {
    print('Current IP input: $ip');
    // Perform connection or configuration updates
  },
)

Additional Information

Contributing

Contributions and bug reports are welcome! Please open an issue or pull request at github.com/wbhinton/ip_address_keypad.

License

This package is open source and available under the terms of the MIT License.

Libraries

ip_address_keypad