📜  向颤动按钮添加渐变 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:25.277000             🧑  作者: Mango

代码示例1
DecoratedBox(
  decoration: BoxDecoration(gradient: LinearGradient(colors: [Colors.pink, Colors.green])),
  child: ElevatedButton(
    onPressed: () {},
    style: ElevatedButton.styleFrom(primary: Colors.transparent),
    child: Text('Elevated Button'),
  ),
)