addEntityType method
Add entity type to the block
Implementation
List<String> addEntityType(String? entity) {
List<String> copiedTypes =
(jsonDecode(jsonEncode(this.entityTypes)) as List)
.map((e) => e as String)
.toList();
if (entity != null) {
return copiedTypes..add(entity);
} else {
return copiedTypes;
}
}