hasReferenceToTexture method

bool hasReferenceToTexture(
  1. String name
)

Detects a referense to texture.

Implementation

bool hasReferenceToTexture(String name) {
  assert(name.isNotEmpty);

  final raw = file.readAsStringSync();
  final lines = raw.split('\n');
  for (final line in lines) {
    if (line.contains(name)) {
      return true;
    }
  }

  return false;
}