From 7a1f7c27433f6a1666b5176e67e960efee39c83d Mon Sep 17 00:00:00 2001 From: Klemen Tusar Date: Fri, 30 Aug 2024 07:37:35 +0100 Subject: [PATCH] :art: remove duplicate null-coalescing responseTypeReference (#634) --- chopper_generator/lib/src/generator.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chopper_generator/lib/src/generator.dart b/chopper_generator/lib/src/generator.dart index ce3efadf..3a4f697c 100644 --- a/chopper_generator/lib/src/generator.dart +++ b/chopper_generator/lib/src/generator.dart @@ -193,9 +193,8 @@ final class ChopperGenerator // Set Response with generic types final Reference responseTypeReference = refer( - responseType?.getDisplayString(withNullability: false) ?? - responseType?.getDisplayString(withNullability: false) ?? - 'dynamic'); + responseType?.getDisplayString(withNullability: false) ?? 'dynamic', + ); // Set the return type final returnType = isResponseObject ? refer(m.returnType.getDisplayString(withNullability: false))