add getSession
This commit is contained in:
parent
7208594bc2
commit
40e82a6d4b
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,16 @@ Future<bool> checkSessionExist() async {
|
|||
return false;
|
||||
}
|
||||
|
||||
Future<String> getSession() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
if (prefs.containsKey('session')) {
|
||||
return prefs.getString('session') ?? 'null';
|
||||
}
|
||||
|
||||
return 'null';
|
||||
}
|
||||
|
||||
Future<void> removeSession() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
|
|
Loading…
Reference in a new issue