@@ -17,6 +17,8 @@ class Settings {
17
17
this .sslEnabled,
18
18
this .cacheSizeBytes,
19
19
this .ignoreUndefinedProperties = false ,
20
+ this .experimentalForceLongPolling = false ,
21
+ this .experimentalAutoDetectLongPolling = false ,
20
22
});
21
23
22
24
/// Constant used to indicate the LRU garbage collection should be disabled.
@@ -52,6 +54,11 @@ class Settings {
52
54
/// Web only.
53
55
final bool ignoreUndefinedProperties;
54
56
57
+ // https://github.com/firebase/firebase-js-sdk/issues/1674
58
+ // https://github.com/firebase/flutterfire/issues/11149#issuecomment-1615133353
59
+ final bool experimentalForceLongPolling;
60
+ final bool experimentalAutoDetectLongPolling;
61
+
55
62
/// Returns the settings as a [Map]
56
63
Map <String , dynamic > get asMap {
57
64
return {
@@ -60,6 +67,9 @@ class Settings {
60
67
'sslEnabled' : sslEnabled,
61
68
'cacheSizeBytes' : cacheSizeBytes,
62
69
if (kIsWeb) 'ignoreUndefinedProperties' : ignoreUndefinedProperties,
70
+ if (kIsWeb) 'experimentalForceLongPolling' : experimentalForceLongPolling,
71
+ if (kIsWeb)
72
+ 'experimentalAutoDetectLongPolling' : experimentalAutoDetectLongPolling,
63
73
};
64
74
}
65
75
@@ -69,6 +79,8 @@ class Settings {
69
79
bool ? sslEnabled,
70
80
int ? cacheSizeBytes,
71
81
bool ? ignoreUndefinedProperties,
82
+ bool ? experimentalForceLongPolling,
83
+ bool ? experimentalAutoDetectLongPolling,
72
84
}) {
73
85
assert (
74
86
cacheSizeBytes == null ||
@@ -84,6 +96,10 @@ class Settings {
84
96
cacheSizeBytes: cacheSizeBytes ?? this .cacheSizeBytes,
85
97
ignoreUndefinedProperties:
86
98
ignoreUndefinedProperties ?? this .ignoreUndefinedProperties,
99
+ experimentalForceLongPolling:
100
+ experimentalForceLongPolling ?? this .experimentalForceLongPolling,
101
+ experimentalAutoDetectLongPolling: experimentalAutoDetectLongPolling ??
102
+ this .experimentalAutoDetectLongPolling,
87
103
);
88
104
}
89
105
@@ -95,7 +111,10 @@ class Settings {
95
111
other.host == host &&
96
112
other.sslEnabled == sslEnabled &&
97
113
other.cacheSizeBytes == cacheSizeBytes &&
98
- other.ignoreUndefinedProperties == ignoreUndefinedProperties;
114
+ other.ignoreUndefinedProperties == ignoreUndefinedProperties &&
115
+ other.experimentalForceLongPolling == experimentalForceLongPolling &&
116
+ other.experimentalAutoDetectLongPolling ==
117
+ experimentalAutoDetectLongPolling;
99
118
100
119
@override
101
120
int get hashCode => Object .hash (
@@ -105,6 +124,8 @@ class Settings {
105
124
sslEnabled,
106
125
cacheSizeBytes,
107
126
ignoreUndefinedProperties,
127
+ experimentalForceLongPolling,
128
+ experimentalAutoDetectLongPolling,
108
129
);
109
130
110
131
@override
0 commit comments