隐藏高的地图

master
章文轩 3 years ago
parent dd0abc7e05
commit 7d15816676

@ -501,59 +501,59 @@ class _InspectionManageDetailsPageState
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
height: 343.w, height: 343.w,
child: AMapWidget( // child: AMapWidget(
rotateGesturesEnabled: false, // rotateGesturesEnabled: false,
scaleEnabled: false, // scaleEnabled: false,
scrollGesturesEnabled: false, // scrollGesturesEnabled: false,
tiltGesturesEnabled: false, // tiltGesturesEnabled: false,
zoomGesturesEnabled: false, // zoomGesturesEnabled: false,
onMapCreated: (controller) { // onMapCreated: (controller) {
_aMapController = controller; // _aMapController = controller;
LatLng _target = LatLng( // LatLng _target = LatLng(
appProvider.location!['latitude'] as double, // appProvider.location!['latitude'] as double,
appProvider.location!['longitude'] as double); // appProvider.location!['longitude'] as double);
_aMapController!.moveCamera(CameraUpdate.newCameraPosition( // _aMapController!.moveCamera(CameraUpdate.newCameraPosition(
CameraPosition(target: _target, zoom: 19))); // CameraPosition(target: _target, zoom: 19)));
}, // },
myLocationStyleOptions: MyLocationStyleOptions(true, // myLocationStyleOptions: MyLocationStyleOptions(true,
circleFillColor: Colors.yellow.withOpacity(0.1), // circleFillColor: Colors.yellow.withOpacity(0.1),
circleStrokeColor: Colors.transparent, // circleStrokeColor: Colors.transparent,
icon: BitmapDescriptor.defaultMarkerWithHue(210)), // icon: BitmapDescriptor.defaultMarkerWithHue(210)),
onLocationChanged: (argument) async { // onLocationChanged: (argument) async {
_aMapController!.moveCamera(CameraUpdate.newCameraPosition( // _aMapController!.moveCamera(CameraUpdate.newCameraPosition(
CameraPosition(target: argument.latLng, zoom: 19))); // CameraPosition(target: argument.latLng, zoom: 19)));
if (_canUploadLocation) { // if (_canUploadLocation) {
BaseModel baseModel = await (_uploadLocation(widget.executeId, // BaseModel baseModel = await (_uploadLocation(widget.executeId,
argument.latLng.longitude, argument.latLng.latitude)); // argument.latLng.longitude, argument.latLng.latitude));
if (!baseModel.success) { // if (!baseModel.success) {
BotToast.showText(text: baseModel.msg); // BotToast.showText(text: baseModel.msg);
} else { // } else {
_canUploadLocation = false; // _canUploadLocation = false;
//线 // //线
_points.add(argument.latLng); // _points.add(argument.latLng);
if (_points.length % 5 == 0) { // if (_points.length % 5 == 0) {
if (_polylines.isEmpty) { // if (_polylines.isEmpty) {
_polylines.add(Polyline( // _polylines.add(Polyline(
points: _points, // points: _points,
color: Colors.red, // color: Colors.red,
width: 10.w, // width: 10.w,
)); // ));
setState(() {}); // setState(() {});
} else { // } else {
_polylines[0] = (Polyline( // _polylines[0] = (Polyline(
points: _points, // points: _points,
color: Colors.red, // color: Colors.red,
width: 10.w, // width: 10.w,
)); // ));
setState(() {}); // setState(() {});
} // }
} // }
} // }
} // }
}, // },
//线 // //线
polylines: Set<Polyline>.of(_polylines), // polylines: Set<Polyline>.of(_polylines),
), // ),
), ),
], ],
) )

@ -48,7 +48,7 @@ class _InspectionManagePageState extends State<InspectionManagePage>
return AkuScaffold( return AkuScaffold(
title: '巡检管理', title: '巡检管理',
appBarBottom: PreferredSize( appBarBottom: PreferredSize(
child: AkuTabBar(controller: _tabController!, tabs: _tabs), child: AkuTabBar(controller: _tabController!, tabs: _tabs,isScrollable: true,),
preferredSize: Size.fromHeight(96.w), preferredSize: Size.fromHeight(96.w),
), ),
body: TabBarView( body: TabBarView(

@ -11,6 +11,7 @@ import 'package:aku_new_community_manager/utils/dev_util.dart';
import 'package:aku_new_community_manager/utils/hive_store.dart'; import 'package:aku_new_community_manager/utils/hive_store.dart';
import 'package:aku_new_community_manager/utils/websocket/fier_dialog.dart'; import 'package:aku_new_community_manager/utils/websocket/fier_dialog.dart';
import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart'; import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
// Package imports: // Package imports:
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -119,8 +120,8 @@ class _SplashPageState extends State<SplashPage> {
/// ///
EquatableConfig.stringify = true; EquatableConfig.stringify = true;
// AMapFlutterLocation.updatePrivacyShow(true, true); AMapFlutterLocation.updatePrivacyShow(true, true);
// AMapFlutterLocation.updatePrivacyAgree(true); AMapFlutterLocation.updatePrivacyAgree(true);
WebSocketUtil().initWebSocket( WebSocketUtil().initWebSocket(
consolePrint: false, consolePrint: false,
onReceiveMes: (message) async { onReceiveMes: (message) async {

@ -14,21 +14,21 @@ packages:
name: amap_flutter_base name: amap_flutter_base
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.0" version: "3.0.0"
amap_flutter_location: amap_flutter_location:
dependency: "direct main" dependency: "direct main"
description: description:
name: amap_flutter_location name: amap_flutter_location
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.0" version: "3.0.0"
amap_flutter_map: amap_flutter_map:
dependency: "direct main" dependency: "direct main"
description: description:
name: amap_flutter_map name: amap_flutter_map
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.1" version: "3.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:

@ -47,9 +47,9 @@ dependencies:
expandable: ^5.0.1 expandable: ^5.0.1
url_launcher: ^6.0.3 url_launcher: ^6.0.3
amap_flutter_map: ^2.0.1 amap_flutter_map: ^3.0.0
amap_flutter_location: ^2.0.0 amap_flutter_location: ^3.0.0
amap_flutter_base: ^2.0.0 amap_flutter_base: ^3.0.0
permission_handler: ^6.1.1 permission_handler: ^6.1.1
velocity_x: ^2.6.0 velocity_x: ^2.6.0

Loading…
Cancel
Save