insertLocation method

Future<void> insertLocation(
  1. LocationDataModel location
)

Implementation

Future<void> insertLocation(LocationDataModel location) async {
  final db = await database;
  await db.insert(
    'locations',
    location.toMap(),
    conflictAlgorithm: ConflictAlgorithm.replace,
  );
  print('Location data saved to local database.');
}