Can someone help to point how do we define base theme for button and use it on every button? Everywhere I look only found textTheme
but not buttonTheme
You can define theme on material widget like
Inside MaterialApp Widget
theme: ThemeData(
elevatedButtonTheme: ElevatedButtonThemeData(
style: TextButton.styleFrom(
backgroundColor: Colors.black,
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
side: BorderSide(color: Colors.red, width: 2),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
textStyle: TextStyle(
color: Colors.white,
fontSize: 20,
wordSpacing: 2,
letterSpacing: 2))),
Use
ElevatedButton(
onPressed: () => print('okay'),
child: Text('Elevated Button'),
),