FlutterCalculationUtils class
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
Static Methods
-
calculateBoundaryBox({required Offset position, required Size size, EdgeInsets padding = EdgeInsets.zero})
→ Rect
-
Calculates the boundary box for a widget given its position, size, and padding.
-
calculateCenterOffset({required double width, required double height})
→ Offset
-
Calculates the center offset for a given size.
-
calculateOffset({required AlignmentGeometry alignment, required double width, required double height})
→ Offset
-
Calculates the offset for a given alignment within a specified width and height.
-
calculatePadding(FlutterTagPosition? position)
→ EdgeInsets
-
Calculates the padding for a tappable badge based on its position.
Defaults to EdgeInsets.only(top: 8, right: 10) if no position is provided.
-
calculatePosition(FlutterTagPosition? position)
→ FlutterTagPosition
-
Recalculates the position of the badge, ensuring all values are non-negative.
If no position is provided, it defaults to top-right corner with end: 0, top: 0.
-
calculateScaledPosition({required Offset position, required double scaleFactor})
→ Offset
-
Calculates the scaled position for a widget based on its size and the desired scale factor.