import 'package:flutter/material.dart';
import 'package:sapaly_shop/models/auth/login/login_response_model.dart';

class UserProvider extends ChangeNotifier {
  LoginResponseModel _user = LoginResponseModel(
    token: '',
    expires: '',
    user: User(
      id: 0,
      email: '',
      name: '',
      lastName: '',
      middleName: '',
      phone: '',
      phoneShort: '',
      isActivated: true,
      lastLogin: '',
      isSuperuser: 0,
      createdAt: '',
      updatedAt: '',
      phoneList: [],
    ),
  );
  LoginResponseModel get user => _user;

  void setUser(String user) {
    _user = LoginResponseModel.fromJson(user);
    notifyListeners();
  }
}
