Error

type 'Future' is not a subtype of type 'String?'

Solution

To receive the value from the future function/await, we need to user var type varaible. Because the Future function returns actually Future type data. Therefore, we need var type variable to receive it. More specifically, Future type data will change to String/int/List/Map etc. type data once the data loading is finished. We need var to handle with Future and String (for example, the data type from the Future function is String).