Android 软件包:google_maps_flatter_platform_interface/src/types/camera.dart';:断言失败:第24行第16位:';目标!=空';:事实并非如此

Android 软件包:google_maps_flatter_platform_interface/src/types/camera.dart';:断言失败:第24行第16位:';目标!=空';:事实并非如此,android,flutter,Android,Flutter,我有以下错误 Exception caught by widgets library The following assertion was thrown building MainScreen(dirty, dependencies: [_EffectiveTickerMode, _InheritedProviderScope<MapModel>, _InheritedProviderScope<UINotifiersModel>, _InheritedProvide

我有以下错误

Exception caught by widgets library 
The following assertion was thrown building MainScreen(dirty, dependencies: [_EffectiveTickerMode, _InheritedProviderScope<MapModel>, _InheritedProviderScope<UINotifiersModel>, _InheritedProviderScope<UserDetailsModel>], state: _MainScreenState#47ca9(tickers: tracking 1 ticker)):
'package:google_maps_flutter_platform_interface/src/types/camera.dart': Failed assertion: line 24 pos 16: 'target != null': is not true.
这是我的密码

class主屏幕扩展StatefulWidget{
//材料页路由
静态常量路由=“/mainScreen”;
//日志记录标签
静态常量标记=“主屏幕”;
@凌驾
_MainScreenState createState()=>\u MainScreenState();
}
类_MainScreenState使用TickerProviderStateMixin扩展状态{
动画控制器加载控制器;
动画;
最终mapScreenScaffoldKey=GlobalKey();
静态最终摄像机位置_kGooglePlex=摄像机位置(
目标:拉丁美洲(37.42796133580664,-122.085749655962),
缩放:14.4746,
);
bool-paureropen=true;
resetApp()
{
设置状态(){
paureropen=true;
});
}
@凌驾
void initState(){
super.initState();
装载控制器=
AnimationController(vsync:this,duration:duration(秒数:35));
动画=Tween(开始:0,结束:40)。动画(新曲线动画)(
父对象:loadingController,曲线:Curves.easeInOutCirc);
loadingController.addStatusListener((动画状态){
如果(状态==AnimationStatus.completed){
加载控制器。反向(从:5);
}
});
//以后激活
//loadingController.forward();
}
@凌驾
无效处置(){
super.dispose();
loadingController.dispose();
}
@凌驾
小部件构建(构建上下文){
最终mapModel=Provider.of(上下文);
最终userDetailsModel=Provider.of(上下文);
最终uiNotifiersModel=Provider.of(上下文);
退货(
孩子:脚手架(
resizeToAvoidBottomInset:true,
钥匙:脚手架钥匙,
抽屉:集装箱(
颜色:颜色,白色,
宽度:270.0,
孩子:抽屉(
子:ListView(
儿童:[
//抽屉头
容器(
身高:165.0,
儿童:抽屉阅读器(
装饰:盒子装饰(颜色:彩色。白色),
孩子:排(
儿童:[
资产(“images/user_icon.png”,高度:65.0,宽度:65.0,),
尺寸控制盒(宽度:16.0,),
纵队(
mainAxisAlignment:mainAxisAlignment.center,
儿童:[
文本(“配置文件名称”,样式:TextStyle(fontSize:16.0,fontFamily:“品牌粗体”),
尺寸箱(高度:6.0,),
文本(“视图配置文件”),
],
),
],
),
),
),
DividerMap(),
尺寸箱(高度:12.0,),
//抽屉本体控制器
列表砖(
前导:图标(图标。付款概述),
标题:文本(“付款”,样式:TextStyle(fontSize:15.0),
),
列表砖(
前导:图标(图标。历史),
标题:文本(“骑乘历史”,样式:TextStyle(fontSize:15.0),
),
列表砖(
前导:图标(图标。聊天室),
标题:文本(“支持”,样式:TextStyle(fontSize:15.0),
),
列表砖(
前导:图标(图标。添加业务),
标题:文本(“关于我们”,样式:TextStyle(fontSize:15.0),
),
手势检测器(
onTap:()
{
FirebaseAuth.instance.signOut();
Navigator.pushName和removeUntil(上下文,SignInPage.route,(route)=>false);
},
孩子:ListTile(
前导:图标(图标。添加业务),
标题:文本(“注销”,样式:TextStyle(fontSize:15.0),
),
),
],
),
),
),
主体:堆栈(
儿童:[
谷歌地图(
填充:仅限边缘设置(底部:150.0,顶部:100.0),
initialCameraPosition:CameraPosition(
目标:mapModel.currentPosition,
缩放:mapModel.currentZoom),
onMapCreated:mapModel.onMapCreated,
myLocationButtonEnabled:正确,
mapType:mapType.normal,
RotategestureEnabled:错误,
tiltGesturesEnabled:false,
zoomGesturesEnabled:对,
ZoomControl启用:对,
标记:mapModel.markers,
onCameraMove:mapModel.onCameraMove,
多段线:mapModel.polylines,
),
//汉堡包菜单
定位(
排名:38.0,
左:22.0,
孩子:做手势
MainScreen file:///C:/Users/Chris/AndroidStudioProjects/taxi_rider/lib/main.dart:77:32
When the exception was thrown, this was the stack: 
#2      new CameraPosition (package:google_maps_flutter_platform_interface/src/types/camera.dart:24:16)
#3      _MainScreenState.build (package:taxi_rider/UI/views/MainScreen.dart:180:40)
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:4612:27)
#5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4495:15)
#6      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4667:11)