updateShippingAddressId method

Future<int> updateShippingAddressId(
  1. String store_id,
  2. String shipping_address_id
)

Implementation

Future<int> updateShippingAddressId(
    String store_id, String shipping_address_id) async {
  Database? db = await DatabaseCreator.instance.database;

  Map<String, dynamic> row = {
    'shipping_address_id': shipping_address_id,
  };

  // do the update and get the number of affected rows
  int updateCount = await db!
      .update('cartTable', row, where: 'store_id = ?', whereArgs: [store_id]);

  return updateCount;
}