Sitelet https://github.com/dnfield/flutter_svg/commit/b6b399e69f74206f9b8373cc00b1f5790bd9d535
Skip to content

Commit b6b399e

Browse files
authored
Added debugFillProperties to SvgPicture to enable easier debugging. (#999)
1 parent 6a24687 commit b6b399e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎packages/flutter_svg/lib/svg.dart‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,4 +496,22 @@ class SvgPicture extends StatelessWidget {
496496
matchTextDirection: matchTextDirection,
497497
);
498498
}
499+
500+
@override
501+
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
502+
super.debugFillProperties(properties);
503+
504+
properties.add(StringProperty('bytesLoader', bytesLoader.toString(), showName: false));
505+
properties.add(DoubleProperty('width', width, defaultValue: null));
506+
properties.add(DoubleProperty('height', height, defaultValue: null));
507+
properties.add(EnumProperty<AlignmentGeometry>('alignment', alignment, defaultValue: Alignment.center));
508+
properties.add(DiagnosticsProperty<bool>('allowDrawingOutsideViewBox', allowDrawingOutsideViewBox, defaultValue: false));
509+
properties.add(EnumProperty<Clip>('clipBehavior', clipBehavior, defaultValue: BoxFit.contain));
510+
properties.add(StringProperty('colorFilter', colorFilter.toString(), defaultValue: null));
511+
properties.add(EnumProperty<BoxFit>('fit', fit, defaultValue: BoxFit.contain));
512+
properties.add(DiagnosticsProperty<Function>('placeholderBuilder', placeholderBuilder, defaultValue: null));
513+
properties.add(DiagnosticsProperty<bool>('matchTextDirection', matchTextDirection, defaultValue: false));
514+
properties.add(DiagnosticsProperty<bool>('excludeFromSemantics', excludeFromSemantics, defaultValue: false));
515+
properties.add(StringProperty('semanticsLabel', semanticsLabel, defaultValue: null));
516+
}
499517
}

0 commit comments

Comments
 (0)