1

Error Code enter image description here

I have tried many condition for the Null check Operator but I couldn't find any solution regarding the Null check Operator.

I want to Insert the data onto Sqlite Database that i have Created Named "LocalDatabase". When i Click Login Button then I want to push data from one screen to another with the help of the database.

Please, Give me the Solution that How can i Transfer the data from one Screen to another using Sqlite database. and How can i Remove the null check Operator Error.

Munsif Ali
  • 1,839
  • 1
  • 8
  • 22

1 Answers1

0

Working solution

  • So, the instructions after your if statement is executed whenever localdb is null or not

  • The easist way to go about this is simply adding these instruction inside a else bloc.

  • Just like so

Future<Database> get getlocaldbms async {
  if(localdbms != null) {
    return localdbms;
  }

//TODO: ADD THIS BLOC TO FIX THE ERROR
  else{
   localdbms = await initlocaldbms();
   return localdbms;
 }
}
Baimam Boukar
  • 908
  • 5
  • 20