Skip to content

Commit

Permalink
Document usage of density independent pixels (#2018)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosilvestre committed May 20, 2024
1 parent d2aadb9 commit cb836d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class IOSFollowingMagnifier extends StatefulWidget {
final Key? magnifierKey;
final LeaderLink leaderLink;
final bool show;

/// The distance, in density independent pixels, from the focal point to the magnifier.
final Offset offsetFromFocalPoint;

final Color? handleColor;
final MagnifierBuilder magnifierBuilder;

Expand Down Expand Up @@ -171,6 +174,7 @@ class IOSRoundedRectangleMagnifyingGlass extends StatelessWidget {
required this.borderColor,
});

/// The distance, in density independent pixels, from the focal point to the magnifier.
final Offset offsetFromFocalPoint;
final double animationValue;
final Color borderColor;
Expand Down Expand Up @@ -240,6 +244,7 @@ class IOSCircleMagnifyingGlass extends StatelessWidget {
this.offsetFromFocalPoint = Offset.zero,
});

/// The distance, in density independent pixels, from the focal point to the magnifier.
final Offset offsetFromFocalPoint;

@override
Expand Down Expand Up @@ -292,7 +297,9 @@ class IosMagnifierViewModel {
required this.borderColor,
});

/// The distance, in density independent pixels, from the focal point to the magnifier.
final Offset offsetFromFocalPoint;

final double animationValue;
final AnimationDirection animationDirection;
final Color borderColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MagnifyingGlass extends StatelessWidget {
}) : super(key: key);

/// The offset from where the magnification is applied, to where this
/// magnifier is displayed.
/// magnifier is displayed, in density independent pixels.
///
/// An [offsetFromFocalPoint] of `Offset.zero` would indicate that this
/// [MagnifyingGlass] is displayed directly over the point of magnification.
Expand Down

0 comments on commit cb836d7

Please sign in to comment.