flutter:连接127.0.0.1报错咋办
E/flutter (31704): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioException [connection error]: The connection errored: Connection refused This indicates an error which most likely cannot be solved by the library. E/flutter (31704): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 51126 E/flutter (31704): #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:519:7) E/flutter (31704): E/flutter (31704): #1 LoginFormState.build. (package:untitled11/main.dart:166:40) E/flutter (31704): E/flutter (31704):
或
I/flutter (32759): i **: DioException [connection error]: The connection errored: Connection refused This indicates an error which most likely cannot be solved by the library. I/flutter (32759): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 51820
把http://127.0.0.1:3006/api/login中的127.0.0.1换成下图选出来的部分👇