I have this freezed class which uses TimeOfDay from material library.
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'time_slot.freezed.dart';
@freezed
abstract class TimeSlot with _$TimeSlot {
factory TimeSlot({
TimeOfDay start,
TimeOfDay end,
}) = _TimeSlot;
}
The generated class still contains DiagnosticableTreeMixin even though I didn't add import for flutter/foundation.dart, thus making a compile error.
Freezed version is 0.10.9
Probably an issue with the logic that determines if "foundations" is imported.
Fancy making a PR? Shouldn't be too difficult, but I have other things to do.
I have no experience dealing with code generation but I'll see what I can do.
Same issue here. I had to manual import foundation within the freezed class.