position property

int get position

Returns the current byte position in the file.

Returns

The current byte position.

Example

final writer = FileWriter('output.txt');
try {
  await writer.write('Hello');
  await writer.flush();
  print('Current position: ${writer.position}');
} finally {
  await writer.close();
}

Implementation

int get position => _position;