

import 'package:car_customer_app/models/post_params_model.dart';
import 'package:car_customer_app/models/user/user.dart';

class AppState {
  static final AppState _instance = AppState._internal();

  AppState._internal();

  factory AppState() => _instance;

  bool isLogged = false;

  set setLogged(v) => isLogged = v;

  bool? get getIsLogged => isLogged;

  User? _user = null;

  set setUser(v) => _user = v;

  User get getUser => _user??User();

  PostParamsModel? _postParams;

  PostParamsModel? get postParamsObject => _postParams;

  Map<String, dynamic> get postParamsJson => _postParams?.toJson() ?? {};
  void setPostParamsModel(PostParamsModel _postParams) {
    this._postParams = _postParams;
  }
}
