ZoomUtils class
Utility class for zoom-related calculations and validations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
calculateFitScale(
double contentWidth, double contentHeight, double containerWidth, double containerHeight) → double - Calculates the optimal scale for fitting content within bounds
-
easeInOut(
double t) → double - Applies easing curve to a value
-
lerp(
double a, double b, double t) → double - Interpolates between two values with easing
-
validateAspectRatio(
double? aspectRatio) → double - Validates aspect ratio to ensure it's positive
-
validateDimension(
double? dimension, double defaultValue) → double - Validates dimensions to ensure they are positive
-
validateScale(
double scale, {double min = 0.1, double max = 10.0}) → double - Validates scale values to ensure they are within reasonable bounds