showWebviewDialog function

void showWebviewDialog(
  1. BuildContext context,
  2. String url
)

Implementation

void showWebviewDialog(BuildContext context, String url) {
  showModalBottomSheet(
    context: context,
    barrierColor: Theme.of(context).colorScheme.surface,
    useSafeArea: true,
    isScrollControlled: true,
    enableDrag: false,
    builder: (context) {
      return Webview(
        url: url,
        onClosePressed: () => Navigator.of(context).pop(),
      );
    },
  );
}