FTileStyles.inherit constructor

FTileStyles.inherit({
  1. required FColors colors,
  2. required FTypography typography,
  3. required FStyle style,
})

Creates a FTileStyles that inherits its properties.

Implementation

factory FTileStyles.inherit({required FColors colors, required FTypography typography, required FStyle style}) {
  final primary = FTileStyle.inherit(colors: colors, typography: typography, style: style);

  return FTileStyles(
    FVariants.from(
      primary,
      variants: {
        [.primary]: primary,
        [.destructive]: .delta(
          contentStyle: FTileContentStyle.inherit(
            colors: colors,
            typography: typography,
            prefix: colors.destructive,
            foreground: colors.destructive,
            mutedForeground: colors.destructive,
          ),
          rawItemContentStyle: FRawTileContentStyle.inherit(
            colors: colors,
            typography: typography,
            prefix: colors.destructive,
            color: colors.destructive,
          ),
        ),
      },
    ),
  );
}