Open matheusrmribeiro opened 4 years ago
I agree, each TimelineTile
could have its own gradient line.
But it would be hard (can't think an easy way right now) to keep the same gradient through all the tiles, which I assume that would be the most common desired use case. Any ideias?
I did not explain so well, but the gradient option it's like you said, each TimelineTile
will have your own gradient LineStyle
.
What I needed was that each TimelineTile
had your own gradient, not all the same. I think it's better in that way than have one that repeat on each tile or even one to all TimelineTile
tree.
Some problems:
If you have one gradient to all TimelineTile
tree.
• Maybe the user can't notice the effect on large lists
If need to repeat the gradient on all tiles • You can create a gradient const and put it on all tiles manually
Old thread, but you can use a ShaderMask
(https://api.flutter.dev/flutter/widgets/ShaderMask-class.html) to achieve all different kinds of variations. Example below creates the gradient along the entire timeline.
ShaderMask(
blendMode: BlendMode.srcIn,
shaderCallback: (bounds) {
return LinearGradient(colors: [
Colors.yellow,
Colors.deepOrange
], tileMode: TileMode.mirror)
.createShader(bounds);
},
child: WidgetEncapsulatingTime()),
Would be nice if the LineStyle have a gradient color option, like the Container widget.