ReturnTFDecoration1 function
InputDecoration
ReturnTFDecoration1(
- dynamic HintText,
- dynamic ShowIcon,
- dynamic PrefixIcon,
- dynamic CameFrom,
Implementation
InputDecoration ReturnTFDecoration1(HintText,ShowIcon,PrefixIcon,CameFrom){
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);
}
}
return (ShowIcon==false)?InputDecoration(
isDense: true,
border: new OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(50.0),
),
borderSide: BorderSide(
width: 0,
style: BorderStyle.none,
),
),
filled: true,
hintStyle:TextStyle(
color:ImpactPrimaryColor,
),
hintText:(HintText!=null)?HintText:ImpactLang["Email_Empty_Descr"],
fillColor: Colors.grey[175],
):InputDecoration(
isDense: true,
border: new OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(50.0),
),
borderSide: BorderSide(
width: 0,
style: BorderStyle.none,
),
),
filled: true,
hintStyle:TextStyle(
color:ImpactPrimaryColor,
),
hintText:(HintText!=null)?HintText:ImpactLang["Email_Empty_Descr"],
fillColor: Colors.grey[175],
prefixIcon:PrefixIcon
);
}