Я хотел попробовать библиотеку HttpServer флаттера, но застрял в самом начале.
import 'dart:io';
void main() async {
var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 8080);
}
продолжить следующее исключение:
Error: Unsupported operation: InternetAddress.LOOPBACK_IP_V4
at Object.throw_ [as throw] (http://localhost:43203/dart_sdk.js:4040:11)
at Function.get LOOPBACK_IP_V4 [as LOOPBACK_IP_V4] (http://localhost:43203/dart_sdk.js:59789:17)
at Function.get loopbackIPv4 [as loopbackIPv4] (http://localhost:43203/dart_sdk.js:59786:33)
at main (http://localhost:43203/packages/dolphin/main.dart.lib.js:13:68)
at main.next (<anonymous>)
at runBody (http://localhost:43203/dart_sdk.js:41692:34)
at Object._async [as async] (http://localhost:43203/dart_sdk.js:41720:7)
at Object.main$ [as main] (http://localhost:43203/packages/dolphin/main.dart.lib.js:12:18)
at main$ (http://localhost:43203/web_entrypoint.dart.lib.js:14:12)
at main$.next (<anonymous>)
at onValue (http://localhost:43203/dart_sdk.js:41673:33)
at _RootZone.runUnary (http://localhost:43203/dart_sdk.js:41558:58)
at _FutureListener.thenAwait.handleValue (http://localhost:43203/dart_sdk.js:37044:29)
at handleValueCallback (http://localhost:43203/dart_sdk.js:37545:49)
at Function._propagateToListeners (http://localhost:43203/dart_sdk.js:37577:17)
at async._AsyncCallbackEntry.new.callback (http://localhost:43203/dart_sdk.js:37333:27)
at Object._microtaskLoop (http://localhost:43203/dart_sdk.js:41774:13)
at _startMicrotaskLoop (http://localhost:43203/dart_sdk.js:41780:13)
at http://localhost:43203/dart_sdk.js:37782:9
Версия флаттера:
Flutter 1.17.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision d3ed9ec945 (vor 2 Wochen) • 2020-04-06 14:07:34 -0700
Engine • revision c9506cb8e9
Tools • Dart 2.8.0 (build 2.8.0-dev.18.0 eea9717938)
ОС:
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.19.0-8-amd64
Architecture: x86-64
Было бы замечательно, если бы кто-нибудь мог мне помочь / имел представление, в чем моя ошибка. Спасибо:)