WelcomeController

PHOTO EMBED

Tue May 17 2022 09:16:37 GMT+0000 (UTC)

Saved by @Vesko_devv #dart

class WelcomeController extends GetxController {
  HomeController homeController = Get.find<HomeController>(); 
  late User user; // Tip User-a 

  @override
  void onInit() {
    user = Get.arguments; // u user-a smjestamo argument's koje smo dobili preko rutiranja u prethodnom kontroleru 
    super.onInit(); 
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {}

  void logout() async { // funkcija za logout koju pozivamo na view na dugme, cistimo kontroller potpuno od sign in-a i firebase 
    await homeController.googleSign.disconnect();
    await homeController.firebaseAuth.signOut();
  }
}
content_copyCOPY