map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
BatteryAuditData map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return BatteryAuditData(
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
createdAt: attachedDatabase.typeMapping
.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,
percentage: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}percentage'])!,
isCharging: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}is_charging'])!,
status: $BatteryAuditTable.$converterstatus.fromSql(attachedDatabase
.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}status'])!),
capacity: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}capacity'])!,
isScreenOn: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}is_screen_on'])!,
);
}