google mertrial io textfileds
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class MyInputs extends StatefulWidget {
@override
_MyInputsState createState() => _MyInputsState();
}
class _MyInputsState extends State<MyInputs> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 30),
padding: EdgeInsets.all(20),
child: textFields(),
);
}
Widget textFields(){
return TextFormField(
maxLength: 20,
keyboardType:TextInputType.emailAddress,
decoration: InputDecoration(
enabled: true,
labelText: "Eamail",
labelStyle: textSTyle(20, Colors.white),
icon: Icon(Icons.email_outlined, size: 30, color: Colors.white,),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.blue, width: 2.0,style: BorderStyle.solid,
),
),
fillColor: Colors.white.withOpacity(0.6),
filled: true,
focusColor: Colors.white,
suffixIcon: Icon(Icons.check_circle, color: Colors.white,),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white, width: 2.0,style: BorderStyle.solid),
),
hintText: "[email protected]",
hintStyle: textSTyle(10,Colors.grey),
helperText: "Abc"
),
);
}
textSTyle(double size, Color color){
return TextStyle(
color: color,
fontSize: size
);
}
}