Closed
Description
I'm attempting to make some of my code strong-mode clean.
For example:
YamlList yamlItems = yamlMob['items'];
if (yamlItems != null) {
yamlItems.forEach(
(String itemName) => mob.addItem(creator.items.itemByName(itemName)));
}
Complains:
file: 'file:///Stuff/Projects/lol_duel/lib/utils/duel.dart'
severity: 'Info'
message: 'A function of type '(String) → Item' can't be assigned to a variable of type '(dynamic) → void'.'
at: '46,11'
source: 'dart'
code: 'uses_dynamic_as_bottom'
If this were a normal list, I'd fix it by using:
List<String> items
But I can't do that for YamlList, even thought it implements ListMixin which takes a type parameter:
abstract class ListMixin<E> implements List<E> {