颤振 (google_maps_flutter) 变量

flutter (google_maps_flutter) variable

我要改坐标取自网络 我尝试了很多方法,但它不起作用

  RxDouble locationmap1 = 11.620215.obs ;
  RxDouble locationmap2 = 12.025192.obs ;
  Completer<GoogleMapController> controller = Completer();
  static final CameraPosition kGooglePlex = CameraPosition(
    target: LatLng (hhh,locationmap2.value),
    zoom: 14.4746,
  );

将变量设为静态:

static RxDouble locationmap1 = 11.620215.obs ;
static RxDouble locationmap2 = 12.025192.obs ;
  Completer<GoogleMapController> controller = Completer();
  static final CameraPosition kGooglePlex = CameraPosition(
    target: LatLng (locationmap1.value,locationmap2.value),
    zoom: 14.4746,
  );