패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소kaushikgodhani/vocsy_epub_viewer

vocsy_epub_viewer

kaushikgodhani/vocsy_epub_viewer open-source repository details.

vocsy_epub_viewer 프로젝트 이미지
스타
41
포크
95
최근 푸시(UTC)
2024. 9. 2.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

Vocsy Epub Viewer pub package

originally a fork of epub_kitty with few more features. i made this out of epub_kitty because the author was inactive(he isn't merging PRs or attending to issues) and i started having alot of issues with the plugin

vocsy_epub_viewer is an epub ebook reader that encapsulates the folioreader framework. It supports iOS and android.

Features

Name Android iOS
Reading Time Left / Pages left ✅ ✅
Last Read Locator ✅ ✅
Distraction Free Reading ✅ ❌
Load E-Pub from Asset ✅ ✅
Copy and Share Text ✅ ✅
Highlight Text ✅ ✅
Multiple Theme [Light / Dark] ✅ ❌
Support Multiple Device Language ✅ ✅
Change FontStyle ✅ ❌
Android 13 Supported ✅ ❌

ScreenShots

  • Light                  

  • Dark

              

Install

This plugin requires Swift to work on iOS. Also, the minimum deployment target is 9.0

platform :ios, '9.0'

Import into pubspec.yaml

dependencies:
  vocsy_epub_viewer: latest_version

NOTE Please add this to the release build type in your app build.gradle to avoid crashes on android release builds

minifyEnabled false
shrinkResources false

NOTE Add These Lines In manifest

  
  • 1
    <uses-permission android:name="android.permission.INTERNET" />
  • 2
   xmlns:tools="http://schemas.android.com/tools"
  • 3
   android:usesCleartextTraffic="true"
   android:requestLegacyExternalStorage="true"
   android:networkSecurityConfig="@xml/network_security_config"
  • 4
   android:exported="true"

NOTE android -> app -> src -> main -> res -> xml Inside xml Folder create xml file network_security_config.xml

Usage

VocsyEpub.setConfig(
           themeColor: Theme.of(context).primaryColor,
           identifier: "iosBook",
           scrollDirection: EpubScrollDirection.ALLDIRECTIONS,
           allowSharing: true,
           enableTts: true,
           nightMode: true,
       );

/**
 * @bookPath
 * @lastLocation (optional and only android)
 */
VocsyEpub.open(
          'bookPath',
           lastLocation: EpubLocator.fromJson({
	   "bookId": "2239",
	   "href": "/OEBPS/ch06.xhtml",
	   "created": 1539934158390,
	   "locations": {
		"cfi": "epubcfi(/0!/4/4[simple_book]/2/2/6)"
	          }
	    }), // first page will open up if the value is null
        );

// Get locator which you can save in your database

VocsyEpub.locatorStream.listen((locator) {
	print('LOCATOR: ${EpubLocator.fromJson(jsonDecode(locator))}');
	// convert locator from string to json and save to your database to be retrieved later
});

You can also load epub from your assets using EpubViewer.openAsset()

await VocsyEpub.openAsset('assets/3.epub',
lastLocation: EpubLocator.fromJson({
	"bookId": "2239",
	"href": "/OEBPS/ch06.xhtml",
	"created": 1539934158390,
	"locations": {
	"cfi": "epubcfi(/0!/4/4[simple_book]/2/2/6)"
	  }
	}), // first page will open up if the value is null
   );

// Get locator which you can save in your database

VocsyEpub.locatorStream.listen((locator) {
	print('LOCATOR: ${EpubLocator.fromJson(jsonDecode(locator))}');
	// convert locator from string to json and save to your database to be retrieved later
});

Check the Example for implementation

Issues

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it. Pull request are also welcome.

For help getting started with Flutter, view the online documentation.

For help on editing plugin code, view the documentation.

Kaushikkumar Godhani GitHub avatar
GitHub 작성자

Kaushikkumar Godhani ↗

@vocsyinfotechSurat
언어JavaDartSwiftRubyKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

  • flutter{"sdk":"flutter"}
  • path_provider^2.0.15
  • path^1.8.3
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗