文字渐变
_gradientText(text,Alignment begin,Alignment end,colors){
return ShaderMask(
shaderCallback: (rect) {
return LinearGradient(
begin: begin,
end: end,
colors: colors,
).createShader(rect);
},
child: Text(
"$text",
style: TextStyle(
color: Colors.white, fontSize: 64.sp, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
);
}
引用
_bigTextView() {
return _gradientText(
S.current.ATUISincerelyInvitesYouSettleIn,
Alignment.topCenter,
Alignment.bottomCenter, [
Color(0xFFFFFFF1),
Color(0xFFFFFFF1),
Color(0xFFFFEDBE),
Color(0xFFFFEDBE)
]);
}
2678

被折叠的 条评论
为什么被折叠?



