update
This commit is contained in:
@ -5,11 +5,13 @@ import 'package:get/get.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
import 'package:rogapp/services/destination_service.dart';
|
||||
import 'package:rogapp/services/maxtrix_service.dart';
|
||||
|
||||
class DestinationController extends GetxController {
|
||||
|
||||
|
||||
List<dynamic> destinations = <dynamic>[].obs;
|
||||
Map<String, dynamic> matrix = {};
|
||||
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
|
||||
@ -24,8 +26,16 @@ class DestinationController extends GetxController {
|
||||
int user_id = indexController.currentUser[0]["user"]["id"] as int;
|
||||
//print(user_id);
|
||||
DestinationService.getDestinations(user_id).then((value){
|
||||
destinations.clear();
|
||||
destinations = value;
|
||||
|
||||
MatrixService.getDestinations(value).then((mat){
|
||||
print(mat);
|
||||
matrix = mat;
|
||||
|
||||
destinations.clear();
|
||||
destinations = value;
|
||||
|
||||
});
|
||||
|
||||
//var val = value[2]["location"]["id"];
|
||||
//print("-----current destinations ----- ${val}");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user