onPress method
Implementation
onPress(List<VehicleCard> vehicleList, int index) {
for (var element in vehicleList) {
element.isSelected = false;
}
vehicleList[index].isSelected = true;
notifyListeners();
}
onPress(List<VehicleCard> vehicleList, int index) {
for (var element in vehicleList) {
element.isSelected = false;
}
vehicleList[index].isSelected = true;
notifyListeners();
}