Skip to content

Instantly share code, notes, and snippets.

@trongdth
Created July 17, 2019 06:21
Show Gist options
  • Save trongdth/42e52ebcab6fd578756b023d156b7b4c to your computer and use it in GitHub Desktop.
Save trongdth/42e52ebcab6fd578756b023d156b7b4c to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Align(
alignment: Alignment.bottomLeft,
child: Text(
(isShowHintText) ? '' : overlapText,
textAlign: TextAlign.start,
style: (txtController.text.isEmpty) ? widget.lblNormalStyle : widget.lblHighlightStyle,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
child: TextField(
style: widget.txtStyle,
textAlign: TextAlign.left,
decoration: InputDecoration(
border: (widget.showBorder) ? UnderlineInputBorder() : InputBorder.none,
hintText: (isShowHintText) ? widget.hintText : '',
),
),
),
],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment