flutter_pdf_plugin_dade 0.0.5 copy "flutter_pdf_plugin_dade: ^0.0.5" to clipboard
flutter_pdf_plugin_dade: ^0.0.5 copied to clipboard

A new Flutter Plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:async';
import 'package:flutter_pdf_plugin_dade/flutter_pdf_plugin_dade.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> _initData() async {
    Map<String,String> map = {};
    map["bookId"] = "177a05deffc62f460ecad3e3dcf89517";
    map["bookPath"] = "/storage/emulated/0/android/2_物理手册.pdf";
    map["pageIndex"] = "13";
    print(map);
    await FlutterPdfPluginDade.readPdf(map);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: MaterialButton(
            onPressed: _initData,
            textColor: Colors.white,
            color: Colors.blue,
            // ignore: prefer_const_constructors
            child: Text("打开文件"),
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter Plugin.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_pdf_plugin_dade