borderVariant method

Widget borderVariant(
  1. BuildContext context,
  2. BsVariant variant, {
  3. double width = 1.0,
})

Colors the border based on the theme color variant, matching .border-*.

Implementation

Widget borderVariant(BuildContext context, BsVariant variant, {double width = 1.0}) {
  final theme = context.bs;
  final color = switch (variant) {
    BsVariant.primary => theme.primary,
    BsVariant.secondary => theme.secondary,
    BsVariant.success => theme.success,
    BsVariant.danger => theme.danger,
    BsVariant.warning => theme.warning,
    BsVariant.info => theme.info,
    BsVariant.light => theme.light,
    BsVariant.dark => theme.dark,
  };
  return border(color: color, width: width);
}