map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
NoteData map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return NoteData(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
content: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}content'],
)!,
createDateTime: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}create_date_time'],
)!,
colorCode: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}color_code'],
)!,
);
}