getAddresses function

Future<List<String>> getAddresses()

Implementation

Future<List<String>> getAddresses() async {
  var interfaces = await NetworkInterface.list();
  List<String> results = [];
  interfaces.fold(results,
      (dynamic pre, e) => results.addAll(e.addresses.map((e) => e.address).toList()));
  return results;
}