I already know the order of await code,now I want to use the variable name which is not null
class Test{
late String name;
init() async{
await name="123";
}
}
main(){
Test().init();
//It's wrong
print(Test().name);
}
I know it does print first and then assign values,this is an example.But in my real code,the await process is a must,can someone fix this bug?
Thanks!!!