Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradient not rendering #521

Closed
lukepighetti opened this issue Mar 18, 2021 · 2 comments
Closed

Gradient not rendering #521

lukepighetti opened this issue Mar 18, 2021 · 2 comments

Comments

@lukepighetti
Copy link

lukepighetti commented Mar 18, 2021

Version

flutter_svg: 0.20.0-nullsafety.3
exported from Figma Desktop App version 95.8

Implementation

SvgPicture.asset(
  'assets/icon.svg',
),

Raw SVG

<svg width="24" height="30" viewBox="0 0 24 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="30">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.08327 0C6.66239 3.06447 8.71414 5.16239 8.51046 9.1976C7.99702 7.64048 6.82436 6.56225 5.8821 6.20172C6.85756 12.2102 1.17851 13.7477 0.177535 19.2258C-0.697505 24.0164 1.60368 28.2704 8.38372 29.9245C6.70774 28.3741 6.18174 26.4359 6.53241 24.4459C7.29326 20.1221 11.8284 18.6441 12.7496 14.5745C12.7569 14.5411 12.763 14.508 12.7699 14.4746C15.1901 16.657 16.4826 21.3564 14.1381 24.7563C15.3294 24.4468 16.3073 23.8796 17.0977 23.1473C17.4038 24.9211 17.45 27.6898 15.1512 29.9245C24.6463 27.8312 23.8579 18.5671 22.0564 16.2801C21.8802 17.555 21.0072 19.2744 19.0344 20.2815C19.9516 18.0405 20.0277 15.4386 19.5147 13.4997C17.2402 4.90977 9.33448 5.06452 8.08327 0Z" fill="white"/>
</mask>
<g mask="url(#mask0)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.08327 0C6.66239 3.06447 8.71414 5.16239 8.51046 9.1976C7.99702 7.64048 6.82436 6.56225 5.8821 6.20172C6.85756 12.2102 1.17851 13.7477 0.177535 19.2258C-0.697505 24.0164 1.60368 28.2704 8.38372 29.9245C6.70774 28.3741 6.18174 26.4359 6.53241 24.4459C7.29326 20.1221 11.8284 18.6441 12.7496 14.5745C12.7569 14.5411 12.763 14.508 12.7699 14.4746C15.1901 16.657 16.4826 21.3564 14.1381 24.7563C15.3294 24.4468 16.3073 23.8796 17.0977 23.1473C17.4038 24.9211 17.45 27.6898 15.1512 29.9245C24.6463 27.8312 23.8579 18.5671 22.0564 16.2801C21.8802 17.555 21.0072 19.2744 19.0344 20.2815C19.9516 18.0405 20.0277 15.4386 19.5147 13.4997C17.2402 4.90977 9.33448 5.06452 8.08327 0Z" fill="url(#paint0_linear)"/>
</g>
<defs>
<linearGradient id="paint0_linear" x1="23.8097" y1="30.4672" x2="23.8097" y2="-1.08725" gradientUnits="userSpaceOnUse">
<stop stop-color="#F05236"/>
<stop offset="1" stop-color="#F5803B"/>
</linearGradient>
</defs>
</svg>

Actual

Screen Shot 2021-03-18 at 1 08 12 PM

Expected

Screen Shot 2021-03-18 at 1 09 41 PM

@dnfield
Copy link
Owner

dnfield commented Mar 24, 2021

Does it work if you move the defs up.? If so dupe of #102

@zixuan-espressoft
Copy link

zixuan-espressoft commented Mar 25, 2021

Move the < defs >...< /def > up below < svg > works for me.

@dnfield dnfield closed this as completed Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants