I get a linter error but don't know how to fix it
final FoodScreenArguments args = ModalRoute.of(context).settings.arguments;
A value of type Object can't be assigned to a variable of type FoodScreenArguments.
Try changing the type of the variable, or casting the right-hand type to FoodScreenArguments .