gotoMap method

void gotoMap(
  1. BuildContext buildContext
)

Implementation

void gotoMap(BuildContext buildContext) {

  SetAddress setAddress=SetAddress();
  setAddress.latitude=18.542093555933373;
  setAddress.longitude=73.83030200177365;

  Navigator.push(
      buildContext,
      MaterialPageRoute(
          builder: (_) => SetLocationScreen(
            setAddress: setAddress,
            googleKey: 'your_map_key',
            mapboxKey: 'mapbox_key',
            isUseGoogleKey: false, //you want google key if not otherwise mapbox
            addressSearchDelay: 2000,//second
          ))).then((setAddress) async {

    showDialog(
        context: buildContext,
        builder: (BuildContext context) {
          return  AlertDialog(
            content: Text('${setAddress.latitude} , ${setAddress.longitude}\n\n'
                'Address: ${setAddress.googleAddress}'),
          );
        });
  });

}