dumpCursor method

Future<void> dumpCursor(
  1. Cursor cursor
)

Prints the contents of a Cursor to standard output.

The position is restored after printing.

See: https://developer.android.com/reference/android/database/DatabaseUtils#dumpCursor(android.database.Cursor)

Implementation

static Future<void> dumpCursor(final Cursor cursor) async {
  assert(Platform.isAndroid);

  final position = cursor.getPosition();
  while (cursor.moveToNext()) {
    print(await dumpCurrentRowToString(cursor));
  }
  cursor.moveToPosition(position);
}