-
Hello, I've just started using Freezed and attempted to follow the instructions - this is my model class: part 'recipe.freezed.dart';
part 'recipe.g.dart';
@freezed
class Recipe {
factory Recipe({
required String id,
required Profile createdBy,
required String name,
required String? imageUrl,
required DateTime createdAt,
required DateTime lastModified,
required List<RecipePanel> method,
required String? notes,
}) = _Recipe;
factory Recipe.fromJson(Map<String, Object?> json) => _$RecipeFromJson(json); It generated both of the part classes, but my freezed class has a bunch of errors relating to the Any ideas on how to fix this? Everything is running on the latest versions, and I ran |
Beta Was this translation helpful? Give feedback.
Answered by
Anemony22
Dec 27, 2023
Replies: 1 comment
-
Solved. Was just missing the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Anemony22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved. Was just missing the
with
in the class declaration 🙄