FResizableStyles.inherit constructor

FResizableStyles.inherit({
  1. required FColors colors,
  2. required FStyle style,
})

Creates a FResizableStyles that inherits its properties.

Implementation

factory FResizableStyles.inherit({required FColors colors, required FStyle style}) {
  FResizableDividerStyle dividerStyle({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,
      height: height,
      width: width,
    ),
  );

  final horizontal = dividerStyle(height: 20, width: 10);
  return FResizableStyles(
    FVariants(
      horizontal,
      variants: {
        [.horizontal]: horizontal,
        [.vertical]: dividerStyle(height: 10, width: 20),
      },
    ),
  );
}