skip to Main Content

ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value

class SplashServices { UserPreferences userPreferences = UserPreferences(); void isLogin() { userPreferences.getUser().then((value) { if (value.token!.isNotEmpty && value.token.toString() != 'null') { Timer( const Duration(seconds: 5), () => Get.toNamed(RouteName.homeView)); } else { Timer( const Duration(seconds: 5), () => Get.toNamed(RouteName.loginView)); } }); } }…

VIEW QUESTION
Back To Top
Search