1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Exception has occurred. _ClientSocketException (Connection refused)

Discussão em 'Mobile' iniciado por Stack, Outubro 4, 2024 às 03:12.

  1. Stack

    Stack Membro Participativo

    your textimport 'package:apicalls/models/posts.dart';your text import 'package:http/http.dart' as http;your text

    class RemoteService {your text Future<List?> getBoxes() async {your text var client = http.Client();your text

    var uri = Uri.parse('http://127.0.0.1:3000/api/boxes');`your text`

    var response = await client.get(uri);`your text`

    var json = response.body;`your text`

    return boxesFromJson(json);`your text`

    // return postsFromJson(json);`your text`


    }your text }your text

    Was expecting this to bring the data from the API but the call is not bringing the details i need, connection is refusing.your text``your text

    Continue reading...

Compartilhe esta Página