Flutter Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
The current implementation of FlagsmithClient attaches sendTimeout from FlagsmithConfig to every http request it sends. On the web platform, this causes dio client to log warnings about the timeout property being incorrectly set for GET requests:
[π Dio] sendTimeout cannot be used without a request body to send
[π Dio] _StackTrace (dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 843:28 get current
dio_web_adapter-2.0.0/lib/src/adapter.dart 149:22 fetch
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5 _async
dio_web_adapter-2.0.0/lib/src/adapter.dart 31:29 fetch
packages/dio/src/dio_mixin.dart 529:27 _dispatchRequest
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
...
)
Consider making FlagsmithClient ignore the timeout property from config for those requests, e.g. by overriding base options for calls with no body:
The current implementation of
FlagsmithClient
attachessendTimeout
fromFlagsmithConfig
to every http request it sends. On the web platform, this causes dio client to log warnings about the timeout property being incorrectly set for GET requests:Consider making
FlagsmithClient
ignore the timeout property from config for those requests, e.g. by overriding base options for calls with no body: