From 6060c43bee23ebae41edbe914ba991ebf0a96924 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 23 Nov 2026 18:55:57 +0100 Subject: server: type the JSON parsing boundaries (avoid_dynamic_calls) Give the decoded JSON values a static type before use: cast the monster-ability card list to List> (and the graphic extras to Map entries), the summon payload to Map, room data lists/maps explicitly, and deck card lists to Map loop variables. The test assertions on the settings payload get the same treatment. Also drops two stale ignore comments (wrong lint code) and a redundant nested assignment. --- server/lib/core/state/sanctuary_deck.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/core/state/sanctuary_deck.dart') diff --git a/server/lib/core/state/sanctuary_deck.dart b/server/lib/core/state/sanctuary_deck.dart index 0221403..057b261 100644 --- a/server/lib/core/state/sanctuary_deck.dart +++ b/server/lib/core/state/sanctuary_deck.dart @@ -18,11 +18,11 @@ class SanctuaryDeck { final List newMultList = []; final List newFlipList = []; - for (final item in modifierDeckData["multPile"] as List) { + for (final Map item in modifierDeckData["multPile"] as List) { final String gfx = item["gfx"]; newMultList.add(ModifierCard(CardType.remove, gfx)); } - for (final item in modifierDeckData["flipPile"] as List) { + for (final Map item in modifierDeckData["flipPile"] as List) { final String gfx = item["gfx"]; newFlipList.add(ModifierCard(CardType.remove, gfx)); } -- cgit v1.3.1