Provider specfically isn't being recognized. It keeps retuening this error "Undefined name 'Provider'. Try correcting the name to one that is defined, or defining the name." (Btw, this is my first time using "FutureBuilder()")
FutureBuilder(
future: Provider.of(context).auth.getCurrentUser(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return displayUserInformation(context, snapshot);
} else {
return CircularProgressIndicator();
}
Provider specfically isn't being recognized. It keeps retuening this error "Undefined name 'Provider'. Try correcting the name to one that is defined, or defining the name." (Btw, this is my first time using "FutureBuilder()")
FutureBuilder(
future: Provider.of(context).auth.getCurrentUser(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return displayUserInformation(context, snapshot);
} else {
return CircularProgressIndicator();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.