import 'package:faucethub/Backend/DebugHelper.dart'; import 'package:faucethub/Backend/hoarder.dart'; class Brain{ static const String API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/api/"; static dynamic UserJson; static List LinkedGamesJson = []; static List NonLinkedGamesJson = []; static void InitUserData(){ LinkedGamesJson = []; NonLinkedGamesJson = []; List linkedGames = UserJson['linkedGames'].toString().split(','); Debug.Log("Going to filter linked games from ${Hoarder.GamesJson.length} games\nmy linked game ids : ${UserJson['linkedGames']}"); Hoarder.GamesJson.forEach((game) { if(linkedGames.contains(game['id'])){ LinkedGamesJson.add(game); }else{ NonLinkedGamesJson.add(game); } }); } }