如何更改 OutlinedButton 的边框颜色
How to change border colour of OutlinedButton
我想更改 OutlinedButton 的边框颜色。你能告诉我怎么做吗?
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),
),
我试过Cannot change border color in OutlinedButton但是没用。
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),
),
指定 ButtonStyle
的边参数
ButtonStyle(
side: MaterialStateProperty.all(BorderSide(color: Colors.deepOrange)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
side: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.0),
),
),
)
我想更改 OutlinedButton 的边框颜色。你能告诉我怎么做吗?
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),
),
我试过Cannot change border color in OutlinedButton但是没用。
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),
),
指定 ButtonStyle
ButtonStyle(
side: MaterialStateProperty.all(BorderSide(color: Colors.deepOrange)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
side: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.0),
),
),
)