更改文字渐变实现方式

newHost
张萌 2 years ago
parent 549d7d9fcb
commit f800ebb1f3

@ -512,18 +512,24 @@ class _MarketPageState extends State<MarketPage>
children: [ children: [
'积分商城'.richText.size(28.sp).italic.bold.black.make(), '积分商城'.richText.size(28.sp).italic.bold.black.make(),
8.wb, 8.wb,
Text( ShaderMask(
'限时兑换', shaderCallback: (bounds) {
style: TextStyle( return LinearGradient(
fontSize: 24.sp, begin: Alignment.topCenter,
fontWeight: FontWeight.bold, end: Alignment.bottomCenter,
fontStyle: FontStyle.italic, colors: [
foreground: Paint() Colors.red,
..shader = ui.Gradient.linear( Colors.yellow,
Offset(150, 690), Offset(150, 695), [ ]).createShader(bounds);
Color(0xFFF94B4B), },
Color(0xFFF7B86F), child: Text(
])), '限时兑换',
style: TextStyle(
fontSize: 24.sp,
color: Colors.white,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic),
),
), ),
Spacer(), Spacer(),
GestureDetector( GestureDetector(

Loading…
Cancel
Save