From 65cc267bf5f1a175a4935642fe65b206d7b5e487 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 9 Jun 2023 02:32:19 +0200 Subject: [PATCH] fix(neon): Disable CookieJar on web Signed-off-by: jld3103 --- packages/neon/neon/lib/src/models/account.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/neon/neon/lib/src/models/account.dart b/packages/neon/neon/lib/src/models/account.dart index ddc11385..a26f425a 100644 --- a/packages/neon/neon/lib/src/models/account.dart +++ b/packages/neon/neon/lib/src/models/account.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:collection/collection.dart'; import 'package:crypto/crypto.dart'; +import 'package:flutter/foundation.dart'; import 'package:json_annotation/json_annotation.dart'; import 'package:meta/meta.dart'; import 'package:nextcloud/nextcloud.dart'; @@ -36,7 +37,7 @@ class Account implements Credentials { password: password, appPassword: password, userAgentOverride: userAgent, - cookieJar: CookieJar(), + cookieJar: !kIsWeb ? CookieJar() : null, ); factory Account.fromJson(final Map json) => _$AccountFromJson(json);