toJson method
Serializes this resource to a JSON-encodable map.
Returns:
- A map containing all relevant resource metadata
- Should include at minimum a 'type' field identifying the resource kind
- Must contain only JSON-encodable values
Implementation Requirements:
- Must be overridden by subclasses
- Should include all identifying metadata
- Should maintain backward compatibility
Example Output:
{
  "type": "font",
  "family": "Roboto",
  "files": ["Roboto-Regular.ttf", "Roboto-Bold.ttf"]
}
Implementation
@override
Map<String, Object> toJson() {
  return {
    'filePath': _filePath,
    'fileName': _fileName,
    'packageName': _packageName,
    'contentBytes': _contentBytes,
  };
}