Issue
Im trying to using an hashtag icon for my flutter app.It there anyway to get this icon ?.Maybe in material design ? I need it as a prefix icon. Hope anyone can help
Heres my code
Container(
width: 160,
height: 55,
margin: EdgeInsets.only(left: 8, right: 10),
child: TextField(
controller: hashtagcontroller2,
decoration: InputDecoration(
hintText: ' Hashtag2',
prefixIcon: ,
border: OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(30.0),
),
borderSide: BorderSide(
width: 2, color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(40.0),
),
borderSide: BorderSide(
width: 2, color: Colors.black),
Solution
Container(
width: 160,
height: 55,
margin: EdgeInsets.only(left: 8, right: 10),
child: TextField(
controller: hashtagcontroller2,
decoration: InputDecoration(
prefixIcon: Padding(
padding: const EdgeInsets.only(top: 16.0, left: 20),
child: Text(
"#",
),
),
border: OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(30.0),
),
borderSide: BorderSide(width: 2, color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(40.0),
),
borderSide: BorderSide(width: 2, color: Colors.black),
)))),
Answered By - Jahidul Islam
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.