locationPromptDialog function

Future<void> locationPromptDialog({
  1. String? text,
  2. String? yesText,
  3. String? noText,
  4. required bool isShareLocationData,
  5. required bool isRequestLocationData,
  6. bool onlyText = false,
  7. LocationNotificationModel? locationNotificationModel,
})

Displays a location prompt dialog

Implementation

Future<void> locationPromptDialog(
    {String? text,
    String? yesText,
    String? noText,
    required bool isShareLocationData,
    required bool isRequestLocationData,
    bool onlyText = false,
    LocationNotificationModel? locationNotificationModel}) {
  var value = showDialog<void>(
    context: AtLocationNotificationListener().navKey.currentContext!,
    barrierDismissible: true,
    builder: (BuildContext context) {
      return LocationPrompt(
          text: text,
          yesText: yesText,
          noText: noText,
          onlyText: onlyText,
          isShareLocationData: isShareLocationData,
          isRequestLocationData: isRequestLocationData,
          locationNotificationModel: locationNotificationModel);
    },
  );
  return value;
}