I create a button to test the database. it returns a set of data. While i did in initState function, what i get is null.
@override
void initState() {
db.queryData('username').then((val) {
_userAuthData = val;
});
super.initState();
print(_userAuthData);
}```
** both async/await and future.then() works the same in button on press function.