import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; class DocumentView extends StatefulWidget { final Future documentBytes; const DocumentView({ Key? key, required this.documentBytes, }) : super(key: key); @override State createState() => _DocumentViewState(); } class _DocumentViewState extends State { // late PdfController _pdfController; @override void initState() { super.initState(); // _pdfController = PdfController( // document: PdfDocument.openData( // widget.documentBytes, // ), // ); } @override Widget build(BuildContext context) { return Container(); // return Scaffold( // appBar: AppBar( // title: Text(S.of(context)!.preview), // ), // body: PdfView( // builders: PdfViewBuilders( // options: const DefaultBuilderOptions( // loaderSwitchDuration: Duration(milliseconds: 500), // ), // pageLoaderBuilder: (context) => const Center( // child: CircularProgressIndicator(), // ), // ), // scrollDirection: Axis.vertical, // controller: _pdfController, // ), // ); } }