FResizableStyles.inherit constructor
FResizableStyles.inherit({
- required FColors colors,
- required FIcons icons,
- required FStyle style,
- required FHapticFeedback hapticFeedback,
Creates a FResizableStyles that inherits its properties.
Implementation
factory FResizableStyles.inherit({
required FColors colors,
required FIcons icons,
required FStyle style,
required FHapticFeedback hapticFeedback,
}) {
FResizableDividerStyle dividerStyle({required FIconBuilder icon, required double height, required double width}) =>
FResizableDividerStyle(
color: colors.border,
focusedOutlineStyle: style.focusedOutlineStyle,
thumbStyle: FResizableDividerThumbStyle(
decoration: ShapeDecoration(
shape: RoundedSuperellipseBorder(borderRadius: style.borderRadius.md),
color: colors.border,
),
foregroundColor: colors.foreground,
icon: icon,
height: height,
width: width,
),
hapticFeedback: hapticFeedback.lightImpact,
);
final horizontal = dividerStyle(icon: icons.gripVertical, height: 20, width: 10);
return FResizableStyles(
FVariants(
horizontal,
variants: {
[.horizontal]: horizontal,
[.vertical]: dividerStyle(icon: icons.gripHorizontal, height: 10, width: 20),
},
),
);
}