From 146ee73fa20de0da4a93bed12ccd0c273af2524c Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Thu, 2 Nov 2023 15:13:42 +0100 Subject: [PATCH] perf(nextcloud): do not use the spread operator for building lists Signed-off-by: Nikolas Rimikis --- packages/nextcloud/lib/src/client.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/nextcloud/lib/src/client.dart b/packages/nextcloud/lib/src/client.dart index e8c47bd4..51585b30 100644 --- a/packages/nextcloud/lib/src/client.dart +++ b/packages/nextcloud/lib/src/client.dart @@ -35,17 +35,15 @@ class NextcloudClient extends DynamiteClient { baseHeaders: language != null ? {'Accept-Language': language} : null, userAgent: userAgentOverride ?? appType.userAgent, authentications: [ - if (appPassword != null) ...[ + if (appPassword != null) DynamiteHttpBearerAuthentication( token: appPassword, ), - ], - if (loginName != null && (password ?? appPassword) != null) ...[ + if (loginName != null && (password ?? appPassword) != null) DynamiteHttpBasicAuthentication( username: loginName, password: (password ?? appPassword)!, ), - ], ], );