import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/get_state_manager.dart';
import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/index/index_controller.dart';

class SearchController extends GetxController {

List<GeoJsonFeature> searchResults = <GeoJsonFeature>[].obs;


@override
  void onInit() {
    IndexController indexController = Get.find<IndexController>();
    if(indexController.locations.isNotEmpty){
      for(int i=0; i<= indexController.locations[0].collection.length - 1; i++){
        GeoJsonFeature p = indexController.locations[0].collection[i];
        searchResults.add(p);
      }
    }
    super.onInit();
  }


}