Skip to content

Commit

Permalink
Fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Sep 11, 2023
1 parent f3a121b commit 9839ca5
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9839ca5

Please sign in to comment.