Questions tagged [sqflite]

Use this tag for questions about the plugin for flutter named sqflite - which enables storage, retrieval, and manipulation of SQLite databases via flutter code.

sqflite is an plugin for . Supports both and .

Package documentation: sqflite

902 questions
0
votes
0 answers

(Flutter) Creating SQFLite database automatically when a new project is created

I am building an app in which a user can create multiple projects. I want each project to have its unique database, since although columns (there will be 6-7 columns) name will be the same, but the values under columns for a new project will be…
Aman Kataria
  • 586
  • 2
  • 12
  • 24
0
votes
0 answers

Failure to change value in a textfield list with TextEditingController

I have a textfield list with values - when I change the value of a textfield - and when I try to reduce the keyboard (to finish the modification to move to another field), my modification is not taken into account, it gives back the old value, it is…
0
votes
1 answer

Accessing Sqflite in Android specific code

I have SQLite database implemented in flutter with Sqflite plugin. I would like to access this database in Android platform-specific code in Kotlin. How can I do that?
user4401
  • 394
  • 1
  • 4
  • 15
0
votes
1 answer

Does sqflite support query with 'CASE WHEN'?

I try to run a query via sqflite and get the error below: DatabaseException(no such column: true (code 1): , while compiling: select (case true WHEN true THEN 111 END) xkey1 from tb_path Here are the SQL steps: create table tb_path(name text, age…
0
votes
1 answer

Dart / Flutter - proper way of loading SQLite object and udating Widgets

I've already seen a lot of discussions regarding the subject, but haven't find a proper soultion for my problem. What I would like to achieve is to pass Process.id from ListView to second widget, then in second widget - load the object from SQLite…
Matt
  • 665
  • 6
  • 16
0
votes
2 answers

Sqflite gives stack Error when trying to insert data

I am just trying to save a user to my database. Following is my user model class class User { int _id; String _userId; String _mobileNumber; User([this._userId, this._mobileNumber]); User.withId(this._id, this._userId,…
user10241787
0
votes
1 answer

Future list and refresh loaders | Flutter problem

I am fetching data from a database and want to implement refresh loader on the same screen and same list. But refresh loader takes a list and I have tried to implement refresh loader with the future list but no success.
LuminiousAndroid
  • 1,557
  • 4
  • 18
  • 28
0
votes
1 answer

How to build a list of dynamic strings in Flutter?

I'm coding an app/game where user inputs his own rules on textfields stored in a SQFLite database. Rules are related to a friend, so it's in a class Friend, with an id, name, rule0, rule1, rule2...rule9. Which is REALLY annoying for a lot of…
httpaed
  • 3
  • 3
-1
votes
1 answer

Flutter SQLLIte DatabaseException(datatype mismatch (code 20 SQLITE_MISMATCH))

I have tried various solution but not working. And not able to find where it cause.for missmatch datatype i have tries pincode change to int til not working. Please help me I am getting DatabaseException(datatype mismatch (code 20…
Nitin
  • 1
  • 2
-1
votes
1 answer

SQFLite saving Boolean variable

I need to save a bool variable (true/false) in SQFLite. I've seen that SQFlite does not support creating a bool column even though Dart supports booleans. This means that I need to create an integer column and save a value with zero - > false and…
DktPhl2018
  • 155
  • 1
  • 1
  • 8
-1
votes
1 answer

Not all Columns are added in the rawInsert method in sqflite

I am trying to add a row to my "exercises" table for my gym_tracker app , the weird thing is that whenever I add the exercise not all the items are inserted , I am new to sqflite so probably there is something wrong in my code , pls tell me if this…
hamz
  • 47
  • 8
-1
votes
2 answers

Flutter SQFlite vs Hive. Which one to use when?

I am developing an app for keeping attendance records for the students and I am confused about using either SQFlite or Hive for the local database. What are the pros and cons of both? How does each perform in apps with smaller and more complex…
Rashid Wassan
  • 664
  • 5
  • 13
-1
votes
2 answers

database update function not working sqflite flutter

am quite new to flutter and my code is pretty much a mess but can anyone explain why db. update doesn't work, whenever I try to update it throws this error "error when trying to…
-1
votes
2 answers

FLUTTER - Getting this null check error, despite having null safety through out the code

Getting this null check error, despite having null safety through out the code. I'm attaching a git repo https://github.com/HidayatBukhari01/Notes-App.git can someone please check this code and explain why am i having this errorenter image…
-1
votes
1 answer

Flutter Sqflite Toggling between Screens based on Login Status creates null operator used on null value error

I am trying to toggle between Login Screen and HomeScreen based on the user status. The logic seems to be working as long as I don't put HomeScreen. I replaced HomeScreen with a different screen to check and the app works as it should. It displays…
mohitnx
  • 11
  • 1