FButtonStyle.inherit constructor

FButtonStyle.inherit({
  1. required FColors colors,
  2. required FTypography typography,
  3. required FStyle style,
  4. required Color color,
  5. required Color foregroundColor,
})

Creates a FButtonStyle that inherits its properties.

Implementation

FButtonStyle.inherit({
  required FColors colors,
  required FTypography typography,
  required FStyle style,
  required Color color,
  required Color foregroundColor,
}) : this(
       decoration: FWidgetStateMap({
         WidgetState.disabled: BoxDecoration(borderRadius: style.borderRadius, color: colors.disable(color)),
         WidgetState.hovered | WidgetState.pressed: BoxDecoration(
           borderRadius: style.borderRadius,
           color: colors.hover(color),
         ),
         WidgetState.any: BoxDecoration(borderRadius: style.borderRadius, color: color),
       }),
       focusedOutlineStyle: style.focusedOutlineStyle,
       contentStyle: FButtonContentStyle.inherit(
         typography: typography,
         enabled: foregroundColor,
         disabled: colors.disable(foregroundColor, colors.disable(color)),
       ),
       iconContentStyle: FButtonIconContentStyle(
         iconStyle: FWidgetStateMap({
           WidgetState.disabled: IconThemeData(
             color: colors.disable(foregroundColor, colors.disable(color)),
             size: 20,
           ),
           WidgetState.any: IconThemeData(color: foregroundColor, size: 20),
         }),
       ),
       tappableStyle: style.tappableStyle,
     );