import 'package:flutter/material.dart';

abstract class LoginCredentials extends ChangeNotifier {
  String get fullname;
  bool get isLoggedIn;

  void setLoggedIn(bool loggedIn);
  void logout();
}

class LoginCredentialsImpl extends LoginCredentials {
  bool loggedIn = false;

  @override
  bool get isLoggedIn => loggedIn;
  @override
  String get fullname => "";

  @override
  void setLoggedIn(bool loggedIn) {
    this.loggedIn = loggedIn;
  }

  @override
  void logout() {
    loggedIn = false;
    notifyListeners();
  }
}
