Giter VIP home page Giter VIP logo

flutter_textfield's Introduction

flutter_textfield

封装了一个简单的textfield:

  • maxLength:支持设置最大输入长度 默认长度16
  • isInputPwd:输入密码(掩码) 默认false
  • getVCode:获取验证码倒计时的输入框 countdown 倒计时秒数 默认60s
  • autoFocus:是否自动获得焦点 eg:进入搜索页面 一进页面就调起键盘
  • keyboardType: 键盘类型 eg:TextInputType.phone 只调取数字键盘
  • placeHolder:eg: 请输入账号
  • 输入内容后,支持一键删除
  • 密码输入支持显示(隐藏)

效果图如下 一个简单的登录页面:

image-20190704103303264

image-20190704103334946

image-20190704103351785

image-20190704103415107

image-20190704103517287

使用:

MyTextField(

​ focusNode: _nodeName,

​ placeHolder: '请输入账号',

​ maxLength: 11,

​ keyboardType: TextInputType.phone,

​ controller: _nameController,

​ ),

备注:键盘弹起会报错

image-20190704103119978

简单暴力的解决方式:

image-20190704103152023

flutter_textfield's People

Contributors

anlesu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.