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

Flutter – give `TextFormField` dynamic controller

I have a function which loads data to TextFormField from firebase . can we supply controller to the TextFormField created by following function. loadDataToTextFormField( QuerySnapshot mySnapshot, int index, String databaseField, String? bulletsAndNumberingType, TextStyle textStyle) { List getDataList = List.from(mySnapshot.docs[index][databaseField]); return…

VIEW QUESTION
Back To Top
Search