Home > Software design >  "targetplatform.windows is not yet supported by the pdfview_flutter pluging"
"targetplatform.windows is not yet supported by the pdfview_flutter pluging"

Time:09-29

im trying to make a web version of my mobile app but I don't know how to view a pdf by an url as i did on the mobile and i have this error "targetplatform.windows is not yet supported by the pdfview_flutter pluging"

here's my code :

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

class PDFPage extends StatelessWidget {
  const PDFPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final String url = ModalRoute.of(context)!.settings.arguments as String;
    return Scaffold(
      appBar: AppBar(backgroundColor: Colors.white),
      body: const PDF().cachedFromUrl(
        url,
        placeholder: (progress) => Container(),
      ),
    );
  }
}

CodePudding user response:

This is because this library is only supported for IOS and Android, try checking out https://pub.dev/packages/syncfusion_flutter_pdfviewer

  • Related