Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
// shadow Container with text first data
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(width: 1.0, color: Colors.red),
),
gradient: LinearGradient(
begin: const Alignment(0.0, -1),
end: const Alignment(0.0, 1),
colors: <Color>[
const Color(0xffFFFFFF),
const Color(0xff1A1717),
],
),
),
child: Center(
child: Text(
"i confuse how to create this on flutter, how do I make the text look like the image above, is there a container above it, if so, how do I validate it if I want to display the container if the text exceeds 5 lines",
style: TextStyle(fontSize: 20))),
),
// secound Data
const Text(
'|| See more',
),
],
),
3条答案
按热度按时间oyxsuwqo1#
这将是有用的。
jdgnovmf2#
如果您不想使用容器,但您希望这样,您可以使用:
试试这个
zbq4xfa03#
尝试堆叠它与容器,并创建一个梯度与2种颜色(白色和透明。