Skip to content

[webview_flutter] Provide callback/error for unsupported content types (e.g., PDF) #48245

@FisherWL

Description

@FisherWL

Steps to Reproduce

on iphones it works fine, but the pdf is not shown up on android emulator or physical android phone.
I guess the reason is android webview doesn't support pdf?
Is there a way we can add this feature?

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: WebView(
          initialUrl:
              'https://www.wmata.com/schedules/maps/upload/2019-System-Map.pdf',
        ),
      ),
    );
  }
}

**Target Platform:**android
Target OS version/browser:
Devices:

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions