From 9839ca5ce7034eff617e5f84267a6430b7ce026b Mon Sep 17 00:00:00 2001 From: Honza Bittner Date: Mon, 11 Sep 2023 14:59:48 +0200 Subject: [PATCH] Fix review --- .../assignments/nested_object_mixin.dart | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/auto_mappr/lib/src/builder/assignments/nested_object_mixin.dart b/packages/auto_mappr/lib/src/builder/assignments/nested_object_mixin.dart index 82e7319..3f7f984 100644 --- a/packages/auto_mappr/lib/src/builder/assignments/nested_object_mixin.dart +++ b/packages/auto_mappr/lib/src/builder/assignments/nested_object_mixin.dart @@ -12,7 +12,7 @@ import 'package:source_gen/source_gen.dart'; mixin NestedObjectMixin on AssignmentBuilderBase { /// Assigns nested object as either: /// - default value - /// - call to already generated mapping between two typ`es + /// - call to already generated mapping between two types /// /// If [convertMethodArgument] is null, uses a tear off call instead. Expression assignNestedObject({ @@ -48,27 +48,6 @@ mixin NestedObjectMixin on AssignmentBuilderBase { return typeConvertersBuilder.buildAssignment(); } - // if (assignment.typeConverters - // .firstWhereOrNull((converter) => converter.canBeUsed(mappingSource: source, mappingTarget: target)) - // case final converter?) { - // // Call. - // if (convertMethodArgument != null) { - // final targetRefer = EmitterHelper.current.typeRefer(type: target); - - // return EmitterHelper.current - // .refer(converter.converter.referCallString, converter.converter.library.identifier) - // .call([convertMethodArgument]).asA(targetRefer); - // } - - // final sourceEmitted = EmitterHelper.current.typeReferEmitted(type: source); - // final targetEmitted = EmitterHelper.current.typeReferEmitted(type: target); - - // // Tear-off. - // return EmitterHelper.current - // .refer(converter.converter.referCallString, converter.converter.library.identifier) - // .asA(refer('$targetEmitted Function($sourceEmitted)')); - // } - // Unknown mapping. if (nestedMapping == null) { final sourceName = assignment.sourceField?.getDisplayString(withNullability: true);