flutter_milibris 0.1.0+1 copy "flutter_milibris: ^0.1.0+1" to clipboard
flutter_milibris: ^0.1.0+1 copied to clipboard

A Flutter plugin that bridges Milibris SDKs, enabling encrypted archive extraction and embedded reader functionality on Android and iOS.

flutter_milibris #

style: very good analysis License: MIT

A Flutter plugin that bridges the Milibris native SDKs on iOS and Android, enabling you to extract Milibris .complete archives and launch the embedded reader directly from your Flutter application.


Platform support #

Android iOS
API 19+ (Android 4.4) iOS 13+

Installation #

Add the package to your pubspec.yaml:

dependencies: flutter_milibris

Setup #

Android #

1. Add the Milibris Maven repository

In android/build.gradle.kts, add the Milibris Maven repository inside allprojects > repositories:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://maven-android-sdk.milibris.net/") }
    }
}

2. Enable core library desugaring

In android/app/build.gradle.kts, enable desugaring and add the dependency:

android {
    compileOptions {
        isCoreLibraryDesugaringEnabled = true
    }
}

dependencies {
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}

3. Add the licence key

In android/app/src/main/AndroidManifest.xml, add the licence key inside <application>:

<meta-data
    android:name="com.milibris.pdfreader.licencekey"
    android:value="YOUR_LICENCE_KEY" />

Also add xmlns:tools to the manifest root and tools:replace="android:label" to <application> to avoid merge conflicts with the plugin's manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools">
    <application
        ...
        tools:replace="android:label">

4. Add xmlns:tools to the plugin manifest

In flutter_milibris_android/android/src/main/AndroidManifest.xml, add the tools namespace so the manifest merger accepts tools:replace from the app:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"/>

iOS #

1. Add the licence key

In ios/Runner/Info.plist, add:

<key>MiLibrisReaderSDKLicenceKey</key>
<string>YOUR_LICENCE_KEY</string>

2. Install CocoaPods dependencies

cd ios && pod install && cd ..

Usage #

Extract a .complete archive #

Use extractArchive to unpack a Milibris .complete file to a destination directory:

import 'package:flutter_milibris/flutter_milibris.dart';

await FlutterMilibris.extractArchive(
  '/path/to/archive.complete', // source archive
  '/path/to/output/directory', // destination
);

Open the Milibris reader #

After extraction, call open with the path to the extracted content to launch the native reader:

await FlutterMilibris.open('/path/to/output/directory');

License #

This project is licensed under the MIT License.

6
likes
0
points
2.91k
downloads

Publisher

verified publisherbam.tech

Weekly Downloads

A Flutter plugin that bridges Milibris SDKs, enabling encrypted archive extraction and embedded reader functionality on Android and iOS.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_milibris_android, flutter_milibris_ios, flutter_milibris_platform_interface

More

Packages that depend on flutter_milibris

Packages that implement flutter_milibris