ImmutableKind<T>.withConstructor constructor
- @literal
Constructs a kind for a class that has a non-constant constructor.
Parameter constructor
is a function that constructs a default instance.
Parameter walk
is a function that maps an instance to a new instance
using a Mapper.
Implementation
@literal
const factory ImmutableKind.withConstructor({
String? name,
String? jsonName,
required T Function() constructor,
required WalkFunction<T> walk,
Function? fromJson,
Object? Function(T object)? toJson,
Map<String, T> constantsByName,
}) = _ConstructorImmutableKind<T>;