Flutter – Dart Freezed package: Missing toJson method in generated file causing InvalidType error
I followed the documentation's step by step to add Freezed to a class: import 'package:freezed_annotation/freezed_annotation.dart'; part 'autonomy_event.freezed.dart'; part 'autonomy_event.g.dart'; @freezed class AutonomyEvent with _$AutonomyEvent { const factory AutonomyEvent({ required int eventCode, required int timestamp, }) = _AutonomyEvent; factory AutonomyEvent.fromJson(Map<String, dynamic>…