getAttributeDisplayIcon function

Widget getAttributeDisplayIcon(
  1. Attribute attribute, {
  2. required BuildContext context,
  3. bool? isFoodPreferences = false,
  4. double? size,
  5. Color? backgroundColor,
  6. Color? foregroundColor,
})

Implementation

Widget getAttributeDisplayIcon(
  Attribute attribute, {
  required BuildContext context,
  bool? isFoodPreferences = false,
  double? size,
  Color? backgroundColor,
  Color? foregroundColor,
}) {
  return attribute.getCircledIcon(
    backgroundColor:
        backgroundColor ??
        (isFoodPreferences!
            ? Theme.of(context).primaryColor
            : getAttributeDisplayBackgroundColor(
                attribute,
                context.extension<SmoothColorsThemeExtension>(),
              )),
    foregroundColor: foregroundColor,
    size: size ?? 32.0,
  );
}