dd_viewer 0.0.1 copy "dd_viewer: ^0.0.1" to clipboard
dd_viewer: ^0.0.1 copied to clipboard

A universal preview device for PDF, Word, Excel, text, png, and jpg

example/lib/main.dart

import 'package:dd_viewer/dd_viewer.dart';
import 'package:dd_viewer/model/filex.dart';
import 'package:flutter/material.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  final pdfUrl = "http://221.234.36.40:8888/wd/pdf.pdf";
  final excUrl = "http://221.234.36.40:8888/wd/excel.xls";
  final docUrl = "http://221.234.36.40:8888/wd/文档.docx";
  final jpg = 'http://221.234.36.40:8888/wd/3.jpg';
  final png = 'http://221.234.36.40:8888/wd/2.png';
  final jpeg = 'http://221.234.36.40:8888/wd/1.jpeg';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('超级视图'),
        ),
        body: GridView.count(crossAxisCount: 2,children: [
          SuperView(file: FileX.netWork(url: docUrl)),
          SuperView(file: FileX.netWork(url: excUrl)),
          SuperView(file: FileX.netWork(url: pdfUrl)),

          SuperView(file: FileX.netWork(url: jpg)),
          SuperView(file: FileX.netWork(url: png)),
          SuperView(file: FileX.netWork(url: jpeg)),
        ],),
      ),
    );
  }

}
1
likes
0
pub points
49%
popularity

Publisher

verified publisheritbug.shop

A universal preview device for PDF, Word, Excel, text, png, and jpg

License

unknown (license)

Dependencies

connectivity_plus, dio, flutter, freezed, freezed_annotation, logger, path, path_provider, permission_handler, plugin_platform_interface

More

Packages that depend on dd_viewer