Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/vector_graphics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.21

* Corrected width/height parameter documentation in VectorGraphic widget.

## 1.1.20

* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
Expand Down
4 changes: 2 additions & 2 deletions packages/vector_graphics/lib/src/vector_graphics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ class VectorGraphic extends StatefulWidget {
final BytesLoader loader;

/// If specified, the width to use for the vector graphic. If unspecified,
/// the vector graphic will take the width of its parent.
/// the vector graphic will take the width of the graphic.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This documentation is an improvement for unconstrained scenarios, but it could be more precise about behavior in constrained environments. To avoid ambiguity, it's helpful to mention both cases, similar to how Flutter's Image widget is documented.

Suggested change
/// the vector graphic will take the width of the graphic.
/// the graphic will be sized to its parent's constraints, or to its
/// intrinsic width if unconstrained.

final double? width;

/// If specified, the height to use for the vector graphic. If unspecified,
/// the vector graphic will take the height of its parent.
/// the vector graphic will take the height of the graphic.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the width property, this documentation could be more precise by describing the behavior for both constrained and unconstrained environments.

Suggested change
/// the vector graphic will take the height of the graphic.
/// the graphic will be sized to its parent's constraints, or to its
/// intrinsic height if unconstrained.

final double? height;

/// How to inscribe the picture into the space allocated during layout.
Expand Down
2 changes: 1 addition & 1 deletion packages/vector_graphics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: vector_graphics
description: A vector graphics rendering package for Flutter using a binary encoding.
repository: https://github.com/flutter/packages/tree/main/packages/vector_graphics
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+vector_graphics%22
version: 1.1.20
version: 1.1.21

environment:
sdk: ^3.9.0
Expand Down