FPaginationStyle.inherit constructor
FPaginationStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required bool touch,
Creates a FPaginationStyle that inherits its properties.
Implementation
FPaginationStyle.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required bool touch,
}) : this(
itemIconStyle: .all(IconThemeData(color: colors.foreground, size: typography.md.fontSize)),
itemDecoration: FVariants.from(
ShapeDecoration(shape: RoundedSuperellipseBorder(borderRadius: style.borderRadius.md)),
variants: {
[.hovered, .pressed]: .shapeDelta(color: colors.secondary),
//
[.selected]: .shapeDelta(color: colors.primary),
[.selected.and(.hovered), .selected.and(.pressed)]: .shapeDelta(color: colors.hover(colors.primary)),
},
),
itemTextStyle: FVariants.from(
typography.sm.copyWith(color: colors.foreground),
variants: {
[.selected]: .delta(color: colors.primaryForeground),
},
),
ellipsisTextStyle: typography.sm.copyWith(color: colors.foreground),
actionTappableStyle: style.tappableStyle,
pageTappableStyle: style.tappableStyle,
focusedOutlineStyle: style.focusedOutlineStyle,
itemConstraints: touch
? const .tightFor(width: 44.0, height: 44.0)
: const .tightFor(width: 32.0, height: 32.0),
);