flutter-form-builder-ecosystem / form_builder_map_field

Map Input Field for flutter_form_builder package. Used to select coordinates on a map.
https://pub.dev/packages/form_builder_map_field
BSD 2-Clause "Simplified" License
6 stars 3 forks source link

Version conflict with the newest flutter_form_builder #7

Open alarmatwork opened 2 years ago

alarmatwork commented 2 years ago

Because form_builder_map_field <1.0.0-alpha.1 depends on flutter_form_builder ^3.8.1 and play_faire depends on flutter_form_builder ^7.0.0, form_builder_map_field <1.0.0-alpha.1 is forbidden. So, because xyz depends on form_builder_map_field ^0.0.1, version solving failed.

elgsylvain85 commented 2 years ago

I feel like this plugin has been abandoned but otherwise here is some useful code taken from the source :

SizedBox(
          width:400,
          height: 300,
          child: LayoutBuilder(
            builder: (context, constraints) {
              var maxWidth = constraints.biggest.width;
              var maxHeight = constraints.biggest.height;

              return Stack(
                children: <Widget>[
                  SizedBox(
                    height: maxHeight,
                    width: maxWidth,
                    child: GoogleMap(
                      initialCameraPosition: const CameraPosition(
                        target: LatLng(37.42796133580664, -122.085749655962),
                        zoom: 14.4746,
                      ),
                      onMapCreated: (GoogleMapController controller) {
                        _controller.complete(controller);
                      },
                      onCameraMove: (CameraPosition newPosition) {
                        print(newPosition.target.toJson());
                      },
                      onTap: (latLng){
                        print(latLng.toJson());
                      },
                      mapType: MapType.normal,
                      myLocationButtonEnabled: true,
                      myLocationEnabled: false,
                      zoomGesturesEnabled: true,
                      // markers: widget.markers,
                      // onTap: widget.onTap,
                      padding: const EdgeInsets.all(0),
                      buildingsEnabled: true,
                      cameraTargetBounds: CameraTargetBounds.unbounded,
                      // circles: widget.circles,
                      compassEnabled: true,
                      // gestureRecognizers: widget.gestureRecognizers,
                      indoorViewEnabled: false,
                      mapToolbarEnabled: true,
                      minMaxZoomPreference: MinMaxZoomPreference.unbounded,
                      // onCameraIdle: widget.onCameraIdle,
                      // onCameraMoveStarted: widget.onCameraMoveStarted,
                      // onLongPress: widget.onLongPress,
                      // polygons: widget.polygons,
                      // polylines: widget.polylines,
                      rotateGesturesEnabled: true,
                      scrollGesturesEnabled: true,
                      tiltGesturesEnabled: true,
                      trafficEnabled: false,
                    ),
                  ),
                  Positioned(
                    bottom: maxHeight / 2,
                    right: (maxWidth - 30) / 2,
                    child: const Icon(
                      Icons.person_pin_circle,
                      size: 30,
                      color: Colors.black,
                    ),
                  ),
                ],
              );
            },
          ),
        )