SizeDelta class
Represents a change in byte size with direction awareness.
Constructors
- SizeDelta(double from, double to)
- Create a byte delta from raw byte values.
- SizeDelta.decrease(double amount)
-
Create a delta representing a decrease.
factory
- SizeDelta.fromConverters(ByteConverter from, ByteConverter to)
-
Create a delta from ByteConverter instances.
factory
- SizeDelta.increase(double amount)
-
Create a delta representing an increase.
factory
Properties
- absoluteDifference → double
-
The absolute difference in bytes.
no setter
- asConverter → ByteConverter
-
As a ByteConverter for the difference.
no setter
- difference → double
-
The raw difference in bytes (can be negative).
no setter
- direction → DeltaDirection
-
The direction of change.
no setter
- from → double
-
Starting value in bytes.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isDecrease → bool
-
Whether the value decreased.
no setter
- isIncrease → bool
-
Whether the value increased.
no setter
- isUnchanged → bool
-
Whether there was no change.
no setter
- percentageChange → double
-
The percentage change (0.5 = 50% increase, -0.5 = 50% decrease).
no setter
- percentageChangeFormatted → String
-
The percentage change as a formatted string.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- to → double
-
Ending value in bytes.
final
Methods
-
format(
{NegativeValueOptions options = NegativeValueOptions.defaults, int decimals = 2}) → String - Formats the delta with the given options.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override