insertAll method

Future<void> insertAll(
  1. List<Model> list
)

Implementation

Future<void> insertAll(final List<Model> list) async {
  int? indexForWeb = kIsWeb ? (await selectAll()).length : null;
  for (final Model model in list) {
    if (kIsWeb) {
      await insert(model, selectAllLength: indexForWeb);
      indexForWeb = indexForWeb! + 1;
    } else {
      await insert(model);
    }
  }
}