flutter-iconfont-cli icon indicating copy to clipboard operation
flutter-iconfont-cli copied to clipboard

IconPark图标 颜色问题

Open yaoing opened this issue 3 years ago • 0 comments

您好, 最近在使用字节提供的IconPark图标, 也支持js的导入方式. 但是导入图标后, 发现color和colors参数只能改变填充颜色, 无法修改图标的描边颜色(一直都是黑色的),

image

以下是图标对应的xml代码:

svgXml = '''
          <svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
            <path
              fill-opacity=".01"
              fill="''' + getColor(0, color, colors, '#fff') + '''"
              d="M0 0h48v48H0z"
            />
            <path
              stroke-linejoin="round"
              stroke-width="4"
              stroke="currentColor"
              d="M10 6a2 2 0 0 1 2-2h28a2 2 0 0 1 2 2v36a2 2 0 0 1-2 2H12a2 2 0 0 1-2-2V6Z"
              data-follow-stroke="currentColor"
              fill="''' + getColor(1, color, colors, '#333333') + '''"
            />
            <path
              stroke-linejoin="round"
              stroke-linecap="round"
              stroke-width="4"
              stroke="currentColor"
              d="M34 6v36M6 14h8M6 24h8M6 34h8M27 4h12M27 44h12"
              data-follow-stroke="currentColor"
              fill="''' + getColor(2, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;

yaoing avatar Jun 19 '22 02:06 yaoing