I am getting this white border in my button and how do I remove it.
My Text button
TextButton(
onPressed: () {},
child: Container(
color: Colors.green,
height: 51,
width: 113,
child: const Center(
child: Text('Sign Up!'),
),
))
My Theme class
static var darkModeAppTheme = ThemeData.dark().copyWith(
scaffoldBackgroundColor: backgroundColor,
cardColor: greyColor,
textButtonTheme: const TextButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStatePropertyAll(whiteColor),
foregroundColor: MaterialStatePropertyAll(blackColor))),
inputDecorationTheme: const InputDecorationTheme(
fillColor: Colors.green,
filled: true,
));
How to remove that white padding
2
Answers
To remove this padding u can do it in ButtonStyle()
you can achieve this 2 ways.
by removing the padding.
By swapping the container
There is two possible way to fixes
You can remove backgroundColor from ButtonStyle
Add style to your Text Button