cantonsRequest function

Future<List<Text>> cantonsRequest()

Implementation

Future<List<Text>> cantonsRequest() async {
  final List<Text> cantonsServer = <Text>[];
  final List<dynamic> retrieved = await Connection().cantos();
  for (final Map<String, dynamic> element in retrieved) {
    cantonsServer.add(Text(element["canton"]));
  }

  return cantonsServer;
}