Free AI web copilot to create summaries, insights and extended knowledge, download it at here
1997
Abstract
s="gist-iframe" src="/gist/annshsingh/65659af8119adb93278b2cef36e20f39.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure><p id="aa99">Below is the visual representation of the code above.</p><figure id="1478"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*nzB75Ciewrr29z97NjDhVQ.png"><figcaption></figcaption></figure><h2 id="7750">3 | Explanation</h2><p id="f777">In the example above, we have a Text widget and a FlutterLogo widget with Gradients applied to them using ShaderMask widget. It is done by simply wrapping those widgets with ShaderMask and providing it with a Gradient (can be Linear, Radial or Sweep) via its <b>shaderCallback </b>property. The shaderCallback is called with the current size of the child of ShaderMask (here, Text and FlutterLogo widgets) so that it can customize the shader to the size and location of the child. The <b>createShader </b>method of the Gradient classes in Flutter is used to create a shader using the bounds passed on to the <b>shaderCallback </b>property (as can be seen in the code snippet above).</p><p id="bf00">Also, do keep in mind to pass color as white to the child widgets of ShaderMask to see the desired result.</p><div id="943d" class="link-block">
<a href="https://readmedium.com/flutter-widget-guide-listwheelscrollview-widget-in-5-mins-or-less-c1da452355d2">
<div>
<div>
<h2>Flutter Widget Guide — ListWheelScrollView Widget in 5 mins or less</h2>
<div><h3>This is Part 18 in the series where I’ll cover all the Flutter widgets that are in this YouTube playlist. I have…</h3></div>
<div><p>medium.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*896aOmL9-up_HAp7MRzLQA.png)"></div>
</div>
Options
</div>
</a>
</div><p id="1f62"><b>Previous </b>👆</p><h2 id="8ca2">How many claps does this article deserve?</h2><p id="1554"><i>If you find this article useful, please <b>click the </b></i>👏<b><i> button</i></b><i> <b>and share </b>to help others find it! Feel free to clap many times (10</i>💥<i>, 20</i>💥<i> or maybe 50</i>💥<i> ?) It fuels my focus to write more of it.</i></p><p id="6ac8">Connect with me on <a href="https://www.linkedin.com/in/annsh/">LinkedIn</a> or say hi on <a href="https://mobile.twitter.com/annsh2013">Twitter</a>, mentioning this article. You can drop an e-mail at
[email protected] as well.</p><p id="6551">See more in the series -</p><div id="9d85" class="link-block">
<a href="https://readmedium.com/flutter-widget-guide-index-f03141793b09">
<div>
<div>
<h2>Flutter Widget Guide — Index</h2>
<div><h3>Hey. I created this series for flutter developers out there who wish to explore a widget with an example. All the…</h3></div>
<div><p>medium.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*OcqcC1Bh78wle2NG)"></div>
</div>
</div>
</a>
</div><p id="24a8">Have a wonderful day 🙂</p><div id="224c" class="link-block">
<a href="https://www.twitter.com/FlutterComm">
<div>
<div>
<h2>Flutter Community</h2>
<div><h3>The latest Tweets from Flutter Community (@FlutterComm). Follow to get notifications of new articles and packages from…</h3></div>
<div><p>www.twitter.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*_KwLA3J_b5nYSMZC)"></div>
</div>
</div>
</a>
</div></article></body>