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) {
    .primary => theme.primary,
    .secondary => theme.secondary,
    .success => theme.success,
    .danger => theme.danger,
    .warning => theme.warning,
    .info => theme.info,
    .light => theme.light,
    .dark => theme.dark,
  };
  return border(color: color, width: width);
}