Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

456
Views
flutter with Sqflite : The return type 'Null' isn't a 'Future<_>', as required by the closure's context

I have a problem function of Inserted => The return type 'Null' isn't a 'Future<_>', as required by the closure's context

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You have to add async to your function.

await database.transaction((txn) async { });

I would also replace then / catchError inside the function with await and try/catch.

about 4 years ago · Juan Pablo Isaza Report

0

If function use async-await then you have to use Future

Future<void> -> function is future and return null
Future<String> -> function is future and return String as output

In above you can replace Future<_> by the return type you expect. I think you have to return int, it will help to know on which row CRUD operation is performed

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!