Creates an int from a Model. If unsucessful, will return -1.
-1
int intFromModel(Model model) => model.data["data"]?.toInt() ?? -1;