Quando rodo o app com esse arquivo de webclient
import 'package:http/http.dart';
void findAll() async {
final Response response = await get("http://192.168.0.39:8080/transactions");
print(response.body);
}
recebo a seguinte mensagem de erro
E/flutter (22500): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Bad state: Insecure HTTP is not allowed by platform: http://192.168.0.39:8080/transactions
E/flutter (22500): #0 _HttpClient._openUrl (dart:_http/http_impl.dart:2435:7)
E/flutter (22500): #1 _HttpClient.openUrl (dart:_http/http_impl.dart:2342:7)
E/flutter (22500): #2 IOClient.send (package:http/src/io_client.dart:31:37)
E/flutter (22500): #3 BaseClient._sendUnstreamed (package:http/src/base_client.dart:91:38)
E/flutter (22500): #4 BaseClient.get (package:http/src/base_client.dart:27:7)
E/flutter (22500): #5 get.<anonymous closure> (package:http/http.dart:46:36)
E/flutter (22500): #6 _withClient (package:http/http.dart:166:20)
E/flutter (22500): #7 get (package:http/http.dart:46:5)
E/flutter (22500): #8 findAll (package:bytebank_2/http/webclient.dart:5:35)
E/flutter (22500): #9 main (package:bytebank_2/main.dart:8:3)
E/flutter (22500): #10 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:136:25)
E/flutter (22500): #11 _rootRun (dart:async/zone.dart:1186:13)
E/flutter (22500): #12 _CustomZone.run (dart:async/zone.dart:1090:19)
E/flutter (22500): #13 _runZoned (dart:async/zone.dart:1626:10)
E/flutter (22500): #14 runZonedGuarded (dart:async/zone.dart:1614:12)
E/flutter (22500): #15 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:132:5)
E/flutter (22500): #16 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
E/flutter (22500): #17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Quando mudo a url para
"https://192.168.0.39:8080/transactions"
O erro que recebo é:
E/flutter (22500): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
E/flutter (22500): WRONG_VERSION_NUMBER(tls_record.cc:242))
Não tenho certeza se é uma limitação da minha rede de não aceitar conexões http, ou se é um problema de configuração do servidor. Alguma luz?