isPly method
Checks if the provided data represents a valid PLY file.
Verifies the PLY magic header ("ply\n") at the beginning of the file.
Parameters:
data
: Binary data to check
Returns true
if the data appears to be a PLY file.
Implementation
bool isPly(Uint8List data) {
if (data.length < 4) return false;
return data[0] == 112 && // 'p'
data[1] == 108 && // 'l'
data[2] == 121 && // 'y'
data[3] == 10; // '\n'
}