xTFM method
Implementation
Widget xTFM({TextEditingController controller, bool obscureText}) {
return XContainer(
padding: EdgeInsets.zero,
margin: EdgeInsets.all(10.0),
rounded: 10,
color: Colors.grey[100],
child: TextFormField(
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
validator: (value) {
if (value.isEmpty) {
return 'Please enter ' + this;
}
return null;
},
controller: controller,
obscureText: obscureText ?? false,
decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 20, color: Colors.black),
contentPadding:
EdgeInsets.only(left: 10.0, right: 5.0, bottom: 5.0),
hintText: ' ' + this,
border: InputBorder.none),
),
);
}