prefer_border_radius_all
Severity | Quick Fix | Options |
---|---|---|
Info | ✅ | ❌ |
Details
PREFER using BorderRadius.all
instead of BorderRadius.circular
.
Using BorderRadius.all
is more efficient than BorderRadius.circular
because of possible const constructor usage.
Bad
DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
),
)
Good
const DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
)