Utils class

Constructors

Utils()
factory

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

calculateRotationOffset(Size size, double degree) Offset
convertRadiusToSigma(double radius) double
Converts radius number to sigma for drawing shadows
degrees(double radians) double
Converts radians to degrees
formatNumber(double number) String
Formats and add symbols (K, M, B) at the end of number.
getBestInitialIntervalValue(double min, double max, double interval, {double baseline = 0.0}) double
Finds the best initial interval value
getDefaultSize(Size screenSize) Size
Returns a default size based on the screen size that is a 70% scaled square based on the screen.
getEfficientInterval(double axisViewSize, double diffInAxis, {double pixelPerInterval = 40}) double
Returns an efficient interval for showing axis titles, or grid lines or ...
getThemeAwareTextStyle(BuildContext context, TextStyle? providedStyle) TextStyle
Returns a TextStyle based on provided context, if providedStyle provided we try to merge it.
normalizeBorderRadius(BorderRadius? borderRadius, double width) BorderRadius?
Decreases borderRadius to <= width / 2
normalizeBorderSide(BorderSide? borderSide, double width) BorderSide
Decreases borderSide to <= width / 2
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
radians(double degrees) double
Converts degrees to radians
roundInterval(double input) double
toString() String
A string representation of this object.
inherited
translateRotatedPosition(double size, double degree) double
Forward the view base on its degree

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

changeInstance(Utils val) → void

Constants

billion → const double
billion number in short scale (https://en.wikipedia.org/wiki/Billion)
defaultBorderSide → const BorderSide
Default value for BorderSide where borderSide value is not exists
kilo → const double
kilo (thousands) number
million → const double
million number