getCapes property
List<ProfileTexture>
get
getCapes
Implementation
List<ProfileTexture> get getCapes {
if (_capes.isNotEmpty) {
// We're not on a legacy profile.
return _capes
.map((element) {
if (element is Map<String, dynamic>) {
return ProfileTexture(
element['id'], element['url'], element['alias']);
}
})
.where((t) => t != null)
.cast<ProfileTexture>()
.toList();
} else {
// Legacy profile, convert using LegacyProfileTextures.
// They also only have a single texture.
final tex = _getTextures;
return [ProfileTexture(tex._profileId, tex.capeUrl(), null, null)];
}
}