getAssetImageWithBandColor static method

Image getAssetImageWithBandColor(
  1. String assetFilePath, {
  2. String configId = GLOBAL_CONFIG_ID,
  3. String? package,
})

将 icon 根据主题色变色后返回

Implementation

static Image getAssetImageWithBandColor(String assetFilePath,
    {String configId = GLOBAL_CONFIG_ID, String? package}) {
  final BaseCommonConfig commonConfig =
      BaseThemeConfig.instance.getConfig(configId: configId).commonConfig;
  if (!assetFilePath.startsWith('assets')) {
    assetFilePath = 'assets/$assetFilePath';
  }
  return getAssetImageWithColor(assetFilePath, commonConfig?.brandPrimary,
      package: package);
}