Skip to content

Commit

Permalink
feat: add common properties with different types (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNico committed Nov 30, 2022
1 parent ef7044f commit e0e09ac
Show file tree
Hide file tree
Showing 17 changed files with 1,653 additions and 1,443 deletions.
8 changes: 4 additions & 4 deletions packages/_internal/lib/models.dart
Expand Up @@ -25,14 +25,14 @@ String constructorNameToCallbackName(String name) => name;
/// This allows Freezed to support deep copy of the object.
/// This does include primitives like [int] and [List].
@freezed
class CloneableProperty with _$CloneableProperty {
factory CloneableProperty({
class DeepCloneableProperty with _$DeepCloneableProperty {
factory DeepCloneableProperty({
required String name,
required String typeName,
required String type,
required bool nullable,
required GenericsParameterTemplate genericParameters,
}) = _CloneableProperty;
}) = _DeepCloneableProperty;
}

/// The information of a specific constructor of a class tagged with `@freezed`.
Expand All @@ -55,7 +55,7 @@ class ConstructorDetails with _$ConstructorDetails {
required List<String> withDecorators,
required List<String> implementsDecorators,
required List<String> decorators,
required List<CloneableProperty> cloneableProperties,
required List<DeepCloneableProperty> cloneableProperties,
required List<AssertTemplate> asserts,
}) = _ConstructorDetails;

Expand Down

0 comments on commit e0e09ac

Please sign in to comment.