FTileGroupStyle.inherit constructor - FTileGroupStyle - forui.widgets.tile library (original) (raw)
Creates a FTileGroupStyle that inherits from the given arguments.
Implementation
FTileGroupStyle.inherit({required FColors colors, required FTypography typography, required FStyle style})
: this(
borderColor: colors.border,
borderWidth: style.borderWidth,
borderRadius: style.borderRadius,
tileStyle: FTileStyle.inherit(colors: colors, typography: typography, style: style),
labelTextStyle: FWidgetStateMap({
WidgetState.error: typography.base.copyWith(
color: style.formFieldStyle.labelTextStyle.maybeResolve({})?.color ?? colors.primary,
fontWeight: FontWeight.w600,
),
WidgetState.disabled: typography.base.copyWith(
color:
style.formFieldStyle.labelTextStyle.maybeResolve({WidgetState.disabled})?.color ??
colors.disable(colors.primary),
fontWeight: FontWeight.w600,
),
WidgetState.any: typography.base.copyWith(
color: style.formFieldStyle.labelTextStyle.maybeResolve({})?.color ?? colors.primary,
fontWeight: FontWeight.w600,
),
}),
descriptionTextStyle: style.formFieldStyle.descriptionTextStyle.map(
(s) => typography.xs.copyWith(color: s.color),
),
errorTextStyle: typography.xs.copyWith(color: style.formFieldStyle.errorTextStyle.color),
);