setIcon method
Update the icon of this.
await guild.setIcon('assets/images/my_guild_icon.png');
Implementation
Future<void> setIcon (String filename) async {
String file = await Helper.getPicture(filename);
Response response = await ioc.use<DiscordApiHttpService>().patch(url: "/guilds/$id")
.payload({ 'icon': file })
.build();
if (response.statusCode == 200) {
_icon = ImageFormater(file, '');
}
}