update to add resume app from sleep
This commit is contained in:
@ -6,14 +6,12 @@ import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';
|
||||
import 'package:flutter_polyline_points/flutter_polyline_points.dart';
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/utils/text_util.dart';
|
||||
import 'package:rogapp/widgets/base_layer_widget.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_new.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_widget.dart';
|
||||
|
||||
class MapWidget extends StatelessWidget {
|
||||
|
||||
@ -34,7 +32,7 @@ class MapWidget extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
GeoJsonFeature? fs = indexController.getFeatureForLatLong(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude);
|
||||
print("------- fs ${fs}------");
|
||||
print("------- fs $fs------");
|
||||
if(fs != null){
|
||||
indexController.currentFeature.clear();
|
||||
indexController.currentFeature.add(fs);
|
||||
@ -71,19 +69,19 @@ class MapWidget extends StatelessWidget {
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Icon(Icons.circle,size: 6.0,),
|
||||
const Icon(Icons.circle,size: 6.0,),
|
||||
i.properties!['cp'] == -1 ?
|
||||
Transform.rotate(
|
||||
alignment: Alignment.centerLeft,
|
||||
origin: Offset.fromDirection(1, 26),
|
||||
angle: 270 * pi / 180,
|
||||
child: Icon(Icons.play_arrow_outlined, color: Colors.red, size: 70,)):
|
||||
child: const Icon(Icons.play_arrow_outlined, color: Colors.red, size: 70,)):
|
||||
Container(color: Colors.transparent,),
|
||||
],
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(color: Colors.white, child: Text(TextUtils.getDisplayTextFeture(i), style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
|
||||
Container(color: Colors.white, child: Text(TextUtils.getDisplayTextFeture(i), style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -107,8 +105,8 @@ class MapWidget extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
Obx(() =>
|
||||
indexController.is_loading == true ? Padding(
|
||||
padding: const EdgeInsets.only(top: 60.0),
|
||||
indexController.is_loading == true ? const Padding(
|
||||
padding: EdgeInsets.only(top: 60.0),
|
||||
child: CircularProgressIndicator(),
|
||||
):
|
||||
FlutterMap(
|
||||
@ -122,7 +120,7 @@ class MapWidget extends StatelessWidget {
|
||||
//print(DateTime.now().toString() + ' [MapEventMoveStart] START');
|
||||
// do something
|
||||
}
|
||||
if (mapEvent is MapEventMoveEnd && indexController.currentUser. length <= 0) {
|
||||
if (mapEvent is MapEventMoveEnd && indexController.currentUser.isEmpty) {
|
||||
//print(DateTime.now().toString() + ' [MapEventMoveStart] END');
|
||||
indexController.loadLocationsBound();
|
||||
//indexController.rogMapController!.move(c.center, c.zoom);
|
||||
@ -131,7 +129,7 @@ class MapWidget extends StatelessWidget {
|
||||
|
||||
},
|
||||
//center: LatLng(37.15319600454702, 139.58765950528198),
|
||||
bounds: indexController.currentBound.length > 0 ? indexController.currentBound[0]: LatLngBounds.fromPoints([LatLng(35.03999881162295, 136.40587119778962), LatLng(36.642756778706904, 137.95226720406063)]),
|
||||
bounds: indexController.currentBound.isNotEmpty ? indexController.currentBound[0]: LatLngBounds.fromPoints([LatLng(35.03999881162295, 136.40587119778962), LatLng(36.642756778706904, 137.95226720406063)]),
|
||||
zoom: 1,
|
||||
interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag,
|
||||
|
||||
@ -143,7 +141,7 @@ class MapWidget extends StatelessWidget {
|
||||
.hideAllPopups(), // Hide popup when the map is tapped.
|
||||
),
|
||||
children: [
|
||||
BaseLayer(),
|
||||
const BaseLayer(),
|
||||
Obx(() =>
|
||||
indexController.routePointLenght > 0 ?
|
||||
PolylineLayer(
|
||||
@ -180,7 +178,7 @@ class MapWidget extends StatelessWidget {
|
||||
}).toList(),
|
||||
)
|
||||
:
|
||||
Center(child: CircularProgressIndicator())
|
||||
const Center(child: CircularProgressIndicator())
|
||||
,
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user