You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[flutter_svg] SvgPicture diagnostics always report the default clipBehavior #197014
engineflutter/engine related. See also e: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: flutter_svgThe Flutter SVG drawing packagespackageflutter/packages repository. See also p: labels.team-engineOwned by Engine team
Create an SvgPicture without passing clipBehavior, so it uses the constructor default Clip.hardEdge.
Inspect its diagnostics, for example with toStringDeep() or in the widget inspector.
Expected results
clipBehavior is omitted from the diagnostics because it has its default value, like the other properties of SvgPicture.
Actual results
clipBehavior: hardEdge is always listed. SvgPicture.debugFillProperties passes defaultValue: BoxFit.contain for the Clip property, which can never be equal to a Clip value.
Code sample
import'package:flutter/foundation.dart';
import'package:flutter_svg/flutter_svg.dart';
voidmain() {
finalSvgPicture picture =SvgPicture.string('<svg width="10" height="10"></svg>');
finalDiagnosticPropertiesBuilder builder =DiagnosticPropertiesBuilder();
picture.debugFillProperties(builder);
for (finalDiagnosticsNode property in builder.properties) {
if (!property.isFiltered(DiagnosticLevel.info)) {
print(property); // Prints "clipBehavior: hardEdge".
}
}
}
Package version
flutter_svg 2.5.0 (current main of flutter/packages).
engineflutter/engine related. See also e: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: flutter_svgThe Flutter SVG drawing packagespackageflutter/packages repository. See also p: labels.team-engineOwned by Engine team
Activity
suryaKommana2662 commentedon Nov 20, 2026
@palmoni5 Thanks for the report. I was able to reproduce this issue on an iPhone 18 Pro.
The diagnostics output includes clipBehavior: hardEdge. The behavior matches the reported issue. Routing to the
team-enginefor further investigation.Flutter Doctor Output
[flutter_svg] Correct the default clip diagnostic value (flutter#13600)