update
This commit is contained in:
@ -12,6 +12,7 @@ class DestinationController extends GetxController {
|
||||
|
||||
List<dynamic> destinations = <dynamic>[].obs;
|
||||
List<Map<String, dynamic>> destination_index_data = <Map<String, dynamic>>[].obs;
|
||||
|
||||
Map<String, dynamic> matrix = {};
|
||||
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
@ -22,6 +23,15 @@ class DestinationController extends GetxController {
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
void deleteDestination(int index){
|
||||
int id = destinations[index]["id"];
|
||||
DestinationService.deleteDestination(id).then((val){
|
||||
destination_index_data.clear();
|
||||
PopulateDestinations();
|
||||
print("####### dest id : ${id}");
|
||||
});
|
||||
}
|
||||
|
||||
void PopulateDestinations(){
|
||||
if(indexController.currentUser.isNotEmpty){
|
||||
int user_id = indexController.currentUser[0]["user"]["id"] as int;
|
||||
|
||||
Reference in New Issue
Block a user