onair
onair

Reputation: 109

how to remove border in OutlinedButton

I'm having trouble when I want to remove the border on the OutlineButton

 OutlinedButton(
  onPressed: () {},
  child: const Text('Pext Page'),
 )

please help me!!

Upvotes: 5

Views: 9890

Answers (1)

Ravindra S. Patil
Ravindra S. Patil

Reputation: 14885

Try below code hope its help to you.

Using transparent border color

  OutlinedButton(
    onPressed: () {},
    child: Text('Outlined button'),
    style: OutlinedButton.styleFrom(
      side: BorderSide(
         color: Colors.transparent,
      ),
    ),
  ),

Using none border

OutlinedButton(
  onPressed: () {},
  style: OutlinedButton.styleFrom(
    side: BorderSide.none,
  ),
  child: const Text('Outlined button'),
),

Your result screen-> image

Or you can used TextButton also

 TextButton(
    onPressed: () {},
    child: Text('Text button'),
  ),

Your result screen using TextButton-> image

Upvotes: 16

Related Questions