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

A new Flutter Plugin.

example/lib/main.dart

import 'package:flutter/material.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 {
    String jsonInfo = "{\"bookId\":\"1\",\"bookPath\":\"2\",\"pageIndex\":0}";
    String pdfInfo = await FlutterPdfPluginDade.readPdf(jsonInfo);
    // ignore: avoid_print
    print(pdfInfo);
  }

  @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