Skip to content

Commit 7b4c099

Browse files
committed
BREAKING: default to outlined input decoration border
To gain more sensible looks out of the box, unless _any_ border is already specified.
1 parent 72b0981 commit 7b4c099

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/src/material/spin_box.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,15 @@ class _SpinBoxState extends BaseSpinBoxState<SpinBox> {
339339
if (bottom > 0) bottom += 8.0; // subTextGap
340340
}
341341

342+
final hasAnyBorder = decoration.border != null ||
343+
decoration.errorBorder != null ||
344+
decoration.enabledBorder != null ||
345+
decoration.focusedBorder != null ||
346+
decoration.disabledBorder != null ||
347+
decoration.focusedErrorBorder != null;
348+
342349
final inputDecoration = decoration.copyWith(
350+
border: !hasAnyBorder ? const OutlineInputBorder() : decoration.border,
343351
errorText: errorText,
344352
prefix: isHorizontal && widget.showButtons
345353
? Icon(null, size: widget.decrementIcon.size)

0 commit comments

Comments
 (0)