gradient-borders
gradient-borders copied to clipboard
Add option to GradientOutlineInputBorder borderAlignment
Feature #5
@obiwanzenobi
@AErmek It looks like Im not able to run your code. Can you use this instead?
final paint = _getPaint(rect);
final outer = borderRadius.toRRect(rect);
double centerOffset;
switch (borderAlignment) {
case OutlineBorderAlignment.onEdge:
centerOffset = borderSide.width;
break;
case OutlineBorderAlignment.inside:
centerOffset = width;
break;
}
final center = outer.deflate(centerOffset / 2.0);
it does not compile for me either - @Tananga could you expose pr with these changes?
btw. isn't there a way to obtain alignment from box border parent?
@Tananga @obiwanzenobi Hi! I’ve updated the PR and changed the code as you suggested. The new switch statement usage was the issue, right?