Skip to content

能否让 参数color支持 Color类型 ? #10

Description

@cn1001wang

能否让 参数color支持 Color类型 ?因为我定义了一组Color常量,场景比如,home页的图标切换,激活是app的主色,未激活是常量中的灰色。

const kSecondaryColor = Color(0xFF8B94BC);
// const kGreenColor = Color(0xFF6AC259);
const kGreenColor = Colors.green;
const kRedColor = Color(0xFFE92E30);
const kGrayColor = Color(0xFFC1C1C1);
const kBlackColor = Color(0xFF101010);

类似这样 使用
IconFont(IconNames.icon1,color:kSecondaryColor )

我看了生成的代码,是因为svg中不支持Color对象,只接受字符串类型。由于我是初学者,不知道怎么让Color对象转成String类型。
最后万分感谢作者开源这个库!!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions