130 lines
5.0 KiB
Dart
130 lines
5.0 KiB
Dart
|
|
// import 'dart:ui';
|
|
|
|
// import 'package:flutter/material.dart';
|
|
// import 'package:flutter_map/plugin_api.dart';
|
|
// import 'package:geojson/geojson.dart';
|
|
// import 'package:get/get.dart';
|
|
// import 'package:rogapp/pages/drawer/drawer_page.dart';
|
|
// import 'package:rogapp/pages/home/home_controller.dart';
|
|
// import 'package:rogapp/routes/app_pages.dart';
|
|
// import 'package:rogapp/services/perfecture_service.dart';
|
|
// import 'package:rogapp/widgets/bottom_sheet_widget.dart';
|
|
// import 'package:flutter_breadcrumb/flutter_breadcrumb.dart';
|
|
// import 'package:rogapp/widgets/perfecture_widget.dart';
|
|
|
|
// class HomePage extends GetView<HomeController> {
|
|
|
|
// final HomeController homeController = Get.find<HomeController>();
|
|
// MapController mapController = Get.arguments[0];
|
|
|
|
// void changeCurrentFeature(GeoJsonFeature fs){
|
|
// if(homeController.currentFeature.length > 0){
|
|
// homeController.currentFeature.clear();
|
|
// }
|
|
// homeController.currentFeature.add(fs);
|
|
// }
|
|
|
|
// Image getImage(int index){
|
|
// if(homeController.locations[0].collection[index].properties!["photos"] == null || homeController.locations[0].collection[index].properties!["photos"] == ""){
|
|
// return Image(image: AssetImage('assets/images/empty_image.png'));
|
|
// }
|
|
// else{
|
|
// return Image(image: NetworkImage(homeController.locations[0].collection[index].properties!["photos"]));
|
|
// }
|
|
// }
|
|
|
|
// Widget getBreadCurms(){
|
|
// return Obx(() =>
|
|
// homeController.perfectures.length > 0 ?
|
|
// BreadCrumb.builder(
|
|
// itemCount: homeController.perfectures.length,
|
|
// builder: (index) {
|
|
// return BreadCrumbItem(
|
|
// content: PerfectureWidget(homeController: homeController, mapController: mapController) //Text('Item$index')
|
|
// );
|
|
// },
|
|
// divider: Icon(Icons.chevron_right),
|
|
// ) :
|
|
// Container(width: 0, height: 0,),
|
|
// );
|
|
// }
|
|
|
|
// @override
|
|
// Widget build(BuildContext context) {
|
|
// return Scaffold(
|
|
// drawer: DrawerPage(),
|
|
// appBar: AppBar(
|
|
// title: Text("app_title".tr),
|
|
// centerTitle: true,
|
|
// actions: [
|
|
// IconButton(
|
|
// icon: const Icon(Icons.map),
|
|
// onPressed: (){
|
|
// //print(homeController.locations.length);
|
|
// },
|
|
// )
|
|
// ],
|
|
// ),
|
|
// floatingActionButton: new FloatingActionButton(
|
|
// onPressed: (){
|
|
// Get.toNamed(AppPages.MAP);
|
|
// },
|
|
// tooltip: 'Increment',
|
|
// child: new Icon(Icons.document_scanner),
|
|
// elevation: 4.0,
|
|
// ),
|
|
// bottomNavigationBar: BottomAppBar(
|
|
// child: new Row(
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
// children: <Widget>[
|
|
// Expanded(child: IconButton(icon: Icon(Icons.camera_enhance), onPressed: (){},),),
|
|
// Expanded(child: new Text('')),
|
|
// Expanded(child: IconButton(icon: Icon(Icons.travel_explore), onPressed: (){}),),
|
|
// ],
|
|
// ),
|
|
// ),
|
|
// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
|
// body:Column(
|
|
// children: [
|
|
// Padding(
|
|
// padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
|
// child: Container(
|
|
// alignment: Alignment.centerLeft,
|
|
// height: 50.0,
|
|
// child: getBreadCurms(),
|
|
// ),
|
|
// ),
|
|
// Expanded(
|
|
// child: Obx(() =>
|
|
// homeController.locations.length > 0 ?
|
|
// ListView.builder(
|
|
// itemCount: homeController.locations[0].collection.length,
|
|
// shrinkWrap: true,
|
|
// itemBuilder: (_, index){
|
|
// return Card(
|
|
// child: ListTile(
|
|
// onTap: (){
|
|
// GeoJsonFeature gf = homeController.locations[0].collection[index];
|
|
// changeCurrentFeature(gf);
|
|
// showModalBottomSheet(
|
|
// isScrollControlled: true,
|
|
// context: context,
|
|
// builder: (context) => BottomSheetWidget(),
|
|
// );
|
|
// },
|
|
// leading: getImage(index),
|
|
// title: Text(homeController.locations[0].collection[index].properties!['location_name'].toString()),
|
|
// subtitle: Text(homeController.locations[0].collection[index].properties!['category']),
|
|
// ),
|
|
// );
|
|
// },
|
|
// ) : Container(width: 0, height: 0,),
|
|
// )
|
|
// )
|
|
// ],
|
|
// )
|
|
// );
|
|
// }
|
|
// }
|