TechieBlossom/flightapp

locations.clear();

Closed this issue · 1 comments

In main.dart you can add "locations.clear();"

addLocations(BuildContext context, List snapshots) {
locations.clear();
for (int i = 0; i < snapshots.length; i++) {
final Location location = Location.fromSnapshot(snapshots[i]);
locations.add(location.name);
}
}

Valid point, sure will take it.. and also will remove for loop and replace with something more appropriate like .map