I would like to change border color of OutlinedButton. Could you tell me how to do it?
OutlinedButton(
onPressed: null,
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
),
),
child: const Text("Kontynuuj jako gość",
style: TextStyle(fontSize: 20, color: Color(0xffffffff)),
textAlign: TextAlign.center),
),
I tried Cannot change border color in OutlinedButton but it does not work.
OutlinedButton(
onPressed: null,
style: OutlinedButton.styleFrom(
side: BorderSide(color: Colors.red, width: 5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25))),
child: const Text("Kontynuuj jako gość",
style: TextStyle(fontSize: 20, color: Color(0xffffffff)),
textAlign: TextAlign.center),
),
Specify side parameter of a ButtonStyle
ButtonStyle(
side: MaterialStateProperty.all(BorderSide(color: Colors.deepOrange)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
side: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.0),
),
),
)
User contributions licensed under CC BY-SA 3.0