import 'package:cheminova/controller/home_service.dart';
import 'package:cheminova/models/user_model.dart';
import 'package:get/get.dart';

class HomeController extends GetxController {
  final HomeService homeService = HomeService();
  var user = Rxn<UserModel>();

  @override
  void onInit() {
    getUser();
    super.onInit();
  }

  Future<void> getUser() async {
    user.value = await homeService.getUser();
    update();
  }
}
