flatBorder static method

InputBorder flatBorder(
  1. BuildContext context, {
  2. Color? color,
  3. double radius = 8,
  4. double width = 1,
})

Outline border with customizable radius and color.

Implementation

static InputBorder flatBorder(
  BuildContext context, {
  Color? color,
  double radius = 8,
  double width = 1,
}) {
  return OutlineInputBorder(
    borderRadius: BorderRadius.circular(radius.r),
    borderSide: BorderSide(
      color: color ?? Theme.of(context).colorScheme.outline,
      width: width,
    ),
  );
}