epub_kitty 0.1.0 copy "epub_kitty: ^0.1.0" to clipboard
epub_kitty: ^0.1.0 copied to clipboard

outdated

epub_kitty is an epub ebook reader that encapsulates the folioreader framework. It supports iOS and android, but is customizable on iOS. It is very easy to use, you just need to set up the configurati [...]

example/lib/main.dart

import 'dart:io';

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

import 'package:flutter/services.dart';
import 'package:epub_kitty/epub_kitty.dart';
import 'package:path_provider/path_provider.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static const pageChannel = const EventChannel('com.xiaofwang.epub_kitty/page');

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: GestureDetector(
            onTap: () async {
              Directory appDocDir = await getTemporaryDirectory();
              print(appDocDir.path);

              String iosBookPath = '${appDocDir.path}/3.epub';
              String androidBookPath = 'file:///android_asset/PhysicsSyllabus.epub';
              EpubKitty.setConfig("iosBook", "#32a852","vertical",true);
              EpubKitty.open(androidBookPath);

              pageChannel.receiveBroadcastStream().listen((Object event) {
                print('page:$event');
              }, onError: null);
            },
            child: Container(
              child: Text('open epub'),
            ),
          ),
        ),
      ),
    );
  }
}
32
likes
0
pub points
42%
popularity

Publisher

unverified uploader

epub_kitty is an epub ebook reader that encapsulates the folioreader framework. It supports iOS and android, but is customizable on iOS. It is very easy to use, you just need to set up the configuration file can open the ebook, very convenient. However, it is not yet highly customizable on android. But he has been able to meet daily needs.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on epub_kitty