hb_password_input_textfield 0.1.1

Flutter Android iOS web

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 custom

hb_password_input_textfield #

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.

Example #

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

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

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

class HBPasswordInputTextFieldPage extends StatefulWidget {
  @override
  _HBPasswordInputTextFieldPageState createState() =>
      _HBPasswordInputTextFieldPageState();
}

class _HBPasswordInputTextFieldPageState
    extends State<HBPasswordInputTextFieldPage> {
  // int length = 0;
  TextEditingController _controller = TextEditingController();
  FocusNode _node = FocusNode();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("HBPasswordInputTextField"),
      ),
      body: GestureDetector(
          behavior: HitTestBehavior.opaque,
          onTap: () {
            _node.unfocus();
          },
          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) {
                print(text);
              },
            ),
          )),
    );
  }
}
0
likes
90
pub points
26%
popularity

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.

Homepage

Documentation

API reference

Uploader

412625278@qq.com

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on hb_password_input_textfield