fromJson property

T Function(Map<String, dynamic> json)? fromJson
final

Function to deserialize a Map<String, dynamic> into data (for hydration).

Despite the Json naming, the argument is a plain Dart map — not a JSON-encoded string. This means Drift/SQLite fromMap constructors work as-is, with no intermediate JSON decoding step:

fromJson: User.fromMap, // Drift’s native fromMap works directly

Implementation

final T Function(Map<String, dynamic> json)? fromJson;