wrapFromString static method

TextureWrap wrapFromString(
  1. String text
)

Implementation

static TextureWrap wrapFromString(String text) {
  switch (text.toLowerCase()) {
    case 'mirroredtepeat':
      return TextureWrap.mirroredRepeat;
    case 'clamptoedge':
      return TextureWrap.clampToEdge;
    case 'repeat':
      return TextureWrap.repeat;
    default:
      throw ArgumentError('Unknown texture wrap $text');
  }
}