adding servicestack to flutter app failing with this message:
flutter packages get
Running “flutter packages get” in test_flutter_app… 1,1s
exit code 0
[test_flutter_app] flutter packages get
Running “flutter packages get” in test_flutter_app…
Because every version of flutter_test from sdk depends on http 0.12.0 and servicestack >=1.0.0 depends on http ^0.11.3+16, flutter_test from sdk is incompatible with servicestack >=1.0.0.
So, because test_flutter_app depends on both servicestack ^1.0.5 and flutter_test any from sdk, version solving failed.
pub get failed (1)
exit code 1
Installed latest flutter:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.10.2, on Microsoft Windows [Version 10.0.17134.345], locale sr-Latn-RS)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] VS Code, 64-bit edition (version 1.28.2)
[√] Connected device (1 available)
I have one more question: exceptionFilter hook is not catching SocketException that is thrown when connection timeout happends. Is there a way to catch this globaly and not wrap every call in try-except block?
/// Gets and sets the connection timeout.
///
/// When connecting to a new host exceeds this timeout, a [SocketException]
/// is thrown. The timeout applies only to connections initiated after the
/// timeout is set.
///
/// When this is null, the OS default timeout is used. The default is
/// null.
Duration connectionTimeout;
In my test application when server is not running I get this in DEBUG CONSOLE:
I think that Stack Trace from my previus message is comming from this bug in Dart:
If I leave HttpClient.connectiontimeout to default value (null) and server is not running then null exception is thrown on line 288 in client.dart (res is null):