23 lines
609 B
Dart
23 lines
609 B
Dart
import 'package:geojson/geojson.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:rogapp/pages/index/index_controller.dart';
|
|
|
|
class SearchBarController 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();
|
|
}
|
|
|
|
|
|
} |