beauty textfield
inspired by a #dribbble shot by prekesh
usage
basic textfield
beautytextfield(
width: double.maxfinite,
height: 60,
duration: duration(milliseconds: 300),
inputtype: textinputtype.text,
prefixicon: icon(icons.lock_outline),
suffixicon: icon(icons.remove_red_eye),
placeholder: "with suffic icon",
ontap: () {
print('click');
},
onchanged: (text) {
print(text);
},
onsubmitted: (data) {
print(data.length);
},
),
advance texfield
beautytextfield(
width: double.maxfinite, //required
height: 60, //required
accentcolor: colors.white, // on focus color
textcolor: colors.purple, //text color
backgroundcolor: colors.deeppurple, //not focused color
textbaseline: textbaseline.alphabetic,
autocorrect: false,
autofocus: false,
enabled: true, // textfield enabled
focusnode: focusnode(),
fontfamily: 'righteous', //text fontfamily
fontstyle: fontstyle.italic,
fontweight: fontweight.w200,
maxlength: 10,
minlines: 1,
maxlines: 2,
wordspacing: 2,
margin: edgeinsets.all(10),
cornerradius: borderradius.all(radius.circular(15)),
duration: duration(milliseconds: 300),
inputtype: textinputtype.text, //required
placeholder: "without suffic icon",
isshadow: true,
obscuretext: false,
prefixicon: icon(icons.lock_outline), //required
suffixicon: icon(icons.remove_red_eye),
onclicksuffix: () {
print('suffix clicked');
},
ontap: () {
print('click');
},
onchanged: (text) {
print(text);
},
onsubmitted: (data) {
print(data.length);
},
),
Comments are closed.