insetBorder method
Inset border used by neumorphic text fields.
Implementation
Border insetBorder({required bool focused, bool hasError = false}) {
if (hasError) {
return Border.all(color: errorOutlineColor, width: errorOutlineWidth);
}
final darkColor = focused ? focusedOutlineColor : insetShadowColor!;
final lightColor = insetHighlightColor!;
final width = focused ? focusedOutlineWidth : outlineWidth;
return Border(
top: BorderSide(color: darkColor, width: width),
left: BorderSide(color: darkColor, width: width),
bottom: BorderSide(color: lightColor, width: width),
right: BorderSide(color: lightColor, width: width),
);
}