Fix sessions auth
This commit is contained in:
parent
0955e98927
commit
0f2f189f4f
1 changed files with 5 additions and 10 deletions
|
@ -12,15 +12,10 @@ class Sessions extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SessionsState extends State<Sessions> {
|
class _SessionsState extends State<Sessions> {
|
||||||
var session = '';
|
Future<dynamic> loadSessions() async {
|
||||||
|
var session = await getSession();
|
||||||
@override
|
var data = await getSessions(session);
|
||||||
void initState() {
|
return data;
|
||||||
super.initState();
|
|
||||||
|
|
||||||
getSession().then((session) async {
|
|
||||||
session = session;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -33,7 +28,7 @@ class _SessionsState extends State<Sessions> {
|
||||||
backgroundColor: const Color(0xff212226),
|
backgroundColor: const Color(0xff212226),
|
||||||
),
|
),
|
||||||
body: FutureBuilder<dynamic>(
|
body: FutureBuilder<dynamic>(
|
||||||
future: getSessions(session),
|
future: loadSessions(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.hasData) {
|
if (snapshot.hasData) {
|
||||||
var listSessions = snapshot.data;
|
var listSessions = snapshot.data;
|
||||||
|
|
Loading…
Reference in a new issue