What is sqflite in Flutter?
Why Interviewers Ask This
This tests whether you can apply Flutter knowledge to real-world scenarios. Interviewers are looking for clarity of thought and evidence that you've encountered this in production code.
Answer
sqflite is the most popular Flutter plugin for using SQLite, a local relational database. It is supported on Android, iOS, and macOS. You can create tables, run SQL queries (SELECT, INSERT, UPDATE, DELETE), use transactions, and perform migrations. It works well for structured data like user profiles, cached API responses, or offline-first apps. For a more Dart-idiomatic ORM approach on top of sqflite, consider using the drift (formerly Moor) package.
Pro Tip
This topic has Flutter-specific nuances that differ from general programming. Highlighting those nuances in your answer shows expertise rather than generic knowledge.