1

how to add separator or divider in between text and leading ico

 TextField(
          decoration: InputDecoration(
            prefixIcon: Icon(Icons.perm_identity ),
            labelText: 'Enter Your Name',
          )
        )
Sabith
  • 1,628
  • 2
  • 20
  • 38

1 Answers1

0

You can try to wrap the Icon in a container and add a border to it.

Container(
  margin: const EdgeInsets.all(15.0),
  padding: const EdgeInsets.all(3.0),
  decoration: BoxDecoration(
    border: Border(left: 
        BorderSide( //                   <--- left side
            color: Colors.black,
            width: 3.0,
        ),
      ),
      child: Icon(Icons.perm_identity),
    ),
),

References

Tinus Jackson
  • 3,397
  • 2
  • 25
  • 58