toSqlite abstract method

Map<String, dynamic> toSqlite()

Serializes the model instance to a Map suitable for insertion or update into an SQLite database.

This method should handle any necessary type conversions, such as:

  • DateTime to ISO8601 String or Unix timestamp int.
  • bool to int (0 or 1).
  • Enums to String or int.
  • Custom objects to a storable format (e.g., JSON string).

Implementation

Map<String, dynamic> toSqlite();