有人能告诉我为什么我的代码没有使边框变成蓝色,而是让它的宽度为 3.0?
编码:
class CreateRoomButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return OutlinedButton(
onPressed: () => print('Create Room'),
style: ButtonStyle(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
side: BorderSide(
color: Colors.blueAccent[100],
width: 3.0,
),
borderRadius: BorderRadius.circular(30.0),
),
),
),
child: Row(
children: [
ShaderMask(
shaderCallback: (rect) =>
Palette.createRoomGradient.createShader(rect),
child: Icon(
Icons.video_call,
color: Colors.white,
size: 35.0,
),
),
const SizedBox(width: 4.0),
Text(
'Create\nRoom',
style: TextStyle(color: Colors.blueAccent[100]),
),
],
),
);
}
}
我还必须在某处添加它(但由于 textColor 在颤振 2.0 中已被贬低,我想知道如何处理它......):
textColor: Palette.facebookblue,
谢谢!