Olá, tive que alterar o código no arquivo webclient.dart para Uri.http conforme uma erro já relatado, mas mesmo assim ele retorna um erro:
Código:
import 'package:http/http.dart';
void findAll() async {
final Response response = await get(Uri.http('http://192.168.0.106:8080', 'transactions'));
print(response.body);
Erro:
E/flutter (32690): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Invalid radix-10 number (at character 1)
E/flutter (32690): //192.168.0.106:8080
E/flutter (32690): ^
E/flutter (32690):
E/flutter (32690): #0 int._throwFormatException (dart:core-patch/integers_patch.dart:132:5)
E/flutter (32690): #1 int._parseRadix (dart:core-patch/integers_patch.dart:158:16)
E/flutter (32690): #2 int._parse (dart:core-patch/integers_patch.dart:101:12)
E/flutter (32690): #3 int.parse (dart:core-patch/integers_patch.dart:64:12)
E/flutter (32690): #4 _Uri._makeHttpUri (dart:core/uri.dart:1591:49)
E/flutter (32690): #5 new _Uri.http (dart:core/uri.dart:1456:12)
E/flutter (32690): #6 findAll (package:bytebank/http/webclient.dart:6:42)
E/flutter (32690): #7 main (package:bytebank/main.dart:7:3)
E/flutter (32690): #8 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:142:25)
E/flutter (32690): #9 _rootRun (dart:async/zone.dart:1354:13)
E/flutter (32690): #10 _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (32690): #11 _runZoned (dart:async/zone.dart:1789:10)
E/flutter (32690): #12 runZonedGuarded (dart:async/zone.dart:1777:12)
E/flutter (32690): #13 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:138:5)
E/flutter (32690): #14 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
E/flutter (32690): #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (32690):