Password input box, verification code input box, multi terminal support: IOS, Android, web. Support plaintext / ciphertext, there are two styles to choose from, and support a variety of UI style customization, including ciphertext character, border, fillet, color, TextStyle, etc.

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.


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

void main() {

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'HBPasswordInputTextField Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      home: HBPasswordInputTextFieldPage(),

class HBPasswordInputTextFieldPage extends StatefulWidget {
  _HBPasswordInputTextFieldPageState createState() =>

class _HBPasswordInputTextFieldPageState
    extends State<HBPasswordInputTextFieldPage> {
  // int length = 0;
  TextEditingController _controller = TextEditingController();
  FocusNode _node = FocusNode();
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("HBPasswordInputTextField"),
      body: GestureDetector(
          behavior: HitTestBehavior.opaque,
          onTap: () {
          child: Container(
            margin: EdgeInsets.only(top: 50),
            child: HBPasswordInputTextField(
              // backgroundColor: Colors.red,
              // fillColor: Colors.red,
              borderWidth: 0.5,
              borderRaiuds: 5,
              controller: _controller,
              node: _node,
              backgroundColor: Colors.red,
              obscureText: true,
              // obscureTextString: "🤪",
              // boxWidth: 50,
              // boxHeight: 50,
              type: HBPasswordInputTextFieldType.BOXES,
              length: 6,
              textStyle: TextStyle(fontSize: 20),
              onChange: (text) {