formatBytes method

  1. @override
Future<String> formatBytes(
  1. int bytes
)
override

Format bytes to human-readable string

Implementation

@override
Future<String> formatBytes(int bytes) async {
  final result = await methodChannel.invokeMethod<String>(
    'format_bytes',
    bytes,
  );
  return result ?? '0 B';
}