π Are you a Flutter Developer? π
Let me show you how to use the ShaderMask widget to apply a shader to Text Widget in Flutter.
π¬ YouTube => youtu.be/zV_gE4s9mzI
π€©π₯π
1/n
π§΅ π
#flutter
Conversation
Replying to
1οΈβ£ In a StatefulWidget, I created & initialized the variables shaderColors & maskColors. I will use them to set the gradient colors
2/n
π§΅ π
1
1
2οΈβ£ In the body I used a Column in a Center widget
3/n
π§΅π
1
1
3οΈβ£ I added the ShaderMask widget to the Column with a Text widget as its child. I used a LinearGradient for the shaderCallback and the variable I created above for its colors.
4/n
π§΅π
1
1
4οΈβ£ I used a list of CheckboxListTile widgets to update the variable used to set the colors of the LinearGradient
5/n
π§΅ π
1
1
2
3
Thanks for checking this out!
1. Follow for more such threads.
2. Retweet the first tweet to spread awareness.
3. Subscribe to my channel bit.ly/39yUtOz
Quote Tweet
Show this thread
