diff --git a/lib/constants/services.dart b/lib/constants/services.dart index 2702ee1..a71a5c2 100644 --- a/lib/constants/services.dart +++ b/lib/constants/services.dart @@ -1,37 +1,142 @@ -const List services = [ - "9Gag", - "Amazon", - "Bilibili", - "CloudFlare", - "Dailymotion", - "Discord", - "Disney+", - "EBay", - "Epic Games", - "Facebook", - "Hulu", - "Imgur", - "Instagram", - "Mail.ru", - "Netflix", - "OK.ru", - "Origin", - "Pinterest", - "QQ", - "Reddit", - "Skype", - "Snapchat", - "Spotify", - "Steam", - "Telegram", - "TikTok", - "Tinder", - "Twitch", - "Viber", - "Vimeo", - "VK.com", - "WeChat", - "Weibo", - "WhatsApp", - "YouTube" +const List> services = [ + { + 'id': '9gag', + 'label': "9Gag", + }, + { + 'id': 'amazon', + 'label': "Amazon", + }, + { + 'id': 'bilibili', + 'label': "Bilibili", + }, + { + 'id': 'cloudflare', + 'label': "CloudFlare", + }, + { + 'id': 'dailymotion', + 'label': "Dailymotion", + }, + { + 'id': 'discord', + 'label': "Discord", + }, + { + 'id': 'disneyplus', + 'label': "Disney+", + }, + { + 'id': 'ebay', + 'label': "EBay+", + }, + { + 'id': 'epic_games', + 'label': "Epic Games", + }, + { + 'id': 'facebook', + 'label': "Facebook", + }, + { + 'id': 'hulu', + 'label': "Hulu", + }, + { + 'id': 'imgur', + 'label': "Imgur", + }, + { + 'id': 'instagram', + 'label': "Instagram", + }, + { + 'id': 'mail_ru', + 'label': "Mail.ru", + }, + { + 'id': 'netflix', + 'label': "Netflix", + }, + { + 'id': 'ok', + 'label': "OK.ru", + }, + { + 'id': 'origin', + 'label': "Origin", + }, + { + 'id': 'pinterest', + 'label': "Pinterest", + }, + { + 'id': 'qq', + 'label': "QQ", + }, + { + 'id': 'reddit', + 'label': "Reddit", + }, + { + 'id': 'skype', + 'label': "Skype", + }, + { + 'id': 'snapchat', + 'label': "Snapchat", + }, + { + 'id': 'spotify', + 'label': "Spotify", + }, + { + 'id': 'steam', + 'label': "Steam", + }, + { + 'id': 'telegram', + 'label': "Telegram", + }, + { + 'id': 'tiktok', + 'label': "TikTok", + }, + { + 'id': 'tinder', + 'label': "Tinder", + }, + { + 'id': 'twitch', + 'label': "Twitch", + }, + { + 'id': 'viber', + 'label': "Viber", + }, + { + 'id': 'vimeo', + 'label': "Vimeo", + }, + { + 'id': 'vk', + 'label': "VK.com", + }, + { + 'id': 'wechat', + 'label': "WeChat", + }, + { + 'id': 'weibo', + 'label': "Weibo", + }, + { + 'id': 'whatsapp', + 'label': "WhatsApp", + }, + { + 'id': 'youtube', + 'label': "YouTube", + }, ]; \ No newline at end of file diff --git a/lib/screens/clients/services_modal.dart b/lib/screens/clients/services_modal.dart index 72b6989..f49d93d 100644 --- a/lib/screens/clients/services_modal.dart +++ b/lib/screens/clients/services_modal.dart @@ -64,17 +64,17 @@ class _ServicesModalState extends State { title: Padding( padding: const EdgeInsets.only(left: 10), child: Text( - services[index], + services[index]['label']!, style: const TextStyle( fontWeight: FontWeight.normal ), ), ), - value: blockedServices.contains(services[index]), + value: blockedServices.contains(services[index]['id']), checkboxShape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5) ), - onChanged: (value) => checkUncheckService(value!, services[index]) + onChanged: (value) => checkUncheckService(value!, services[index]['id']!) ) ), ),