Initial commit
This commit is contained in:
19
lib/data/accountModel.dart
Normal file
19
lib/data/accountModel.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
class AccountModel extends ChangeNotifier {
|
||||
bool _isLoggedIn = false;
|
||||
|
||||
bool get isLoggedIn => _isLoggedIn;
|
||||
|
||||
void logout() {
|
||||
_isLoggedIn = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void login() {
|
||||
_isLoggedIn = true;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user