map method

  1. @override
WindowRectangleRow map(
  1. Map<String, dynamic> data, {
  2. String? tablePrefix,
})
override

Maps the given row returned by the database into the fitting data class.

Implementation

@override
WindowRectangleRow map(Map<String, dynamic> data, {String? tablePrefix}) {
  final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
  return WindowRectangleRow(
    id: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}id'],
    )!,
    width: attachedDatabase.typeMapping.read(
      DriftSqlType.double,
      data['${effectivePrefix}width'],
    ),
    height: attachedDatabase.typeMapping.read(
      DriftSqlType.double,
      data['${effectivePrefix}height'],
    ),
    dx: attachedDatabase.typeMapping.read(
      DriftSqlType.double,
      data['${effectivePrefix}dx'],
    ),
    dy: attachedDatabase.typeMapping.read(
      DriftSqlType.double,
      data['${effectivePrefix}dy'],
    ),
  );
}