getTextures method

List<GTexture?> getTextures({
  1. String? prefix,
  2. List<GTexture?>? out,
})

Gets a list of GTextures that match the given prefix.

The prefix parameter is used to filter the list of textures to be returned by their name.

The out parameter is an optional list that will be filled with the matching textures. If it's not provided, a new list will be created.

Returns the list of matching GTextures.

Implementation

List<GTexture?> getTextures({String? prefix, List<GTexture?>? out}) {
  prefix ??= '';
  out ??= [];
  final list = getNames(prefix: prefix);
  for (var name in list) {
    out.add(getTexture(name));
  }
  return out;
}