ReturnTFDecoration3 function
InputDecoration
ReturnTFDecoration3(
- dynamic HintText,
- dynamic ShowIcon,
- dynamic PrefixIcon,
- dynamic CameFrom,
- dynamic BoxIcClr,
Implementation
InputDecoration ReturnTFDecoration3(HintText,ShowIcon,PrefixIcon,CameFrom,BoxIcClr){
if(ShowIcon==null){
ShowIcon=false;
}
if(PrefixIcon==null){
if(CameFrom=="Email"){
PrefixIcon = Icon(
Icons.alternate_email,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
else if(CameFrom=="Password"){
PrefixIcon = Icon(
Icons.lock,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
else if(CameFrom=="Code"){
PrefixIcon = Icon(
Icons.assistant,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
else if(CameFrom=="Name"){
PrefixIcon = Icon(
Icons.person,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
else if(CameFrom=="Phone"){
PrefixIcon = Icon(
Icons.phone,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
else {
PrefixIcon = Icon(
Icons.alternate_email,
color:(ImpactSelectedTheme=="Dark")?Colors.white:Colors.black87,
);
}
}
if(BoxIcClr==null){
BoxIcClr = ImpactPrimaryColor;
}
return InputDecoration(
border:InputBorder.none,
hintStyle: new TextStyle(
color: Colors.grey[800],
),
errorStyle:TextStyle(
color:Colors.red,
),
hintText: HintText,
);
}