title: How to get the total of column values in sqflite in flutter?
body: <p>I want to get the total of the price column values and save it in a variable and return it...I have gone through other posts one of which is the question which i am asking but it was in android native and i am new to sqflite so i couldnt figure out how to write the code. So please help me with suggestions.</p>
  
  <p>this is my code of the columns i am using</p>
  
  <pre><code>void _onCreate(Database db, int version) async {
  await db.execute(
      "CREATE TABLE Cart(id INTEGER PRIMARY KEY,name TEXT, price TEXT,category 
  TEXT,images TEXT)");
  print("DB created");
  }
  </code></pre>
  
  <p>I am trying to do this</p>
  
  <pre><code>Future calculateTotal() async{
  var dbClient = await db;// couldnt figure out after this
  var cursor = dbClient.rawQuery("SELECT SUM(price) as Total FROM Cart", 
  null);
  if(cursor.move)
  }
  </code></pre>