IconButtonStyles.from constructor
IconButtonStyles.from(
- TUIColors colors
Implementation
IconButtonStyles.from(tui.TUIColors colors)
: primary = ButtonColorStyle(
backgroundColor: _createStateProperty(
colors.primary, colors.primaryHover, colors.disabledBackground),
foregroundColor: _createStateProperty(
colors.onPrimary,
colors.onPrimary,
colors.disabledContent,
),
borderSide: _createStateProperty(
BorderSide.none,
BorderSide(color: colors.onSurface, width: 1.5),
BorderSide.none)),
secondary = ButtonColorStyle(
backgroundColor: _createStateProperty(colors.secondary,
colors.secondaryHover, colors.disabledBackground),
foregroundColor: _createStateProperty(
colors.onSecondary,
colors.onSecondary,
colors.disabledContent,
),
borderSide: _createStateProperty(
BorderSide.none,
BorderSide(color: colors.onSurface, width: 1.5),
BorderSide.none)),
outlined = ButtonColorStyle(
backgroundColor: _createStateProperty(
Colors.transparent, colors.surfaceHover, Colors.transparent),
foregroundColor: _createStateProperty(
colors.onSurface,
colors.onSurface,
colors.disabledContent,
),
borderSide: _createStateProperty(
BorderSide(color: colors.outline, width: 1.5),
BorderSide(color: colors.onSurface, width: 2),
BorderSide(color: colors.disabledContent, width: 1.5))),
ghost = ButtonColorStyle(
backgroundColor: _createStateProperty(
Colors.transparent, colors.surfaceHover, Colors.transparent),
foregroundColor: _createStateProperty(
colors.onSurface,
colors.onSurface,
colors.disabledContent,
),
borderSide: _createStateProperty(
BorderSide.none, BorderSide.none, BorderSide.none));