我试着用线性渐变使纽曼按钮飘动,但是当我的背景色和我的按钮的颜色相同时,它不会显示为一个新形状的容器。我正在使用https://pub.dev/packages/flutter_neumorphic。有人能指点我怎么用一个例子来做这个吗?这是我想要重新创造的东西。谢谢。
发布于 2022-03-27 18:12:10
NeumorphicButton(
padding: EdgeInsets.zero,
style: NeumorphicStyle(
color: Colors.transparent,
),
onPressed: () => Navigator.of(context).pop(),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 10),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [color1,color2],
),
),
child: const Text(
'Sign Up',
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w700, fontSize: 21),
),
),
),
https://stackoverflow.com/questions/61288190
复制相似问题