update
This commit is contained in:
parent
941e9eaa5b
commit
4753926c34
4 changed files with 137 additions and 70 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
|
|
@ -22,8 +24,8 @@ class _MainPageState extends State<MainPage> {
|
|||
void _checkLogged() async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
bool userStatus = prefs.containsKey('user');
|
||||
|
||||
if (!userStatus) {
|
||||
// ignore: use_build_context_synchronously
|
||||
context.go('/');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue