recalcNextRowId method

Future<void> recalcNextRowId()

Implementation

Future<void> recalcNextRowId() async {
  final rows = await scan();
  _nextRowId = rows.isEmpty
      ? 1
      : rows.map((r) => r.id).reduce((a, b) => a > b ? a : b) + 1;
}