ConvertSize class

A utility class for converting file sizes from bytes to human-readable format.

The ConvertSize class provides a static method for converting a file size in bytes into a more understandable string format, including bytes (B), kilobytes (KB), megabytes (MB), and gigabytes (GB). The conversion takes into account the size of the file and returns the size in the appropriate units with two decimal places for precision.

Constructors

ConvertSize()

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

toLogicSizeString(int fileSizeInBytes) String
Converts a file size in bytes to a human-readable string format.