just_image_flutter 1.0.1 copy "just_image_flutter: ^1.0.1" to clipboard
just_image_flutter: ^1.0.1 copied to clipboard

discontinued

Zero-config Flutter plugin for just_image. Bridges the Rust-powered image processing engine to Flutter apps on Android, iOS, macOS, Linux, and Windows via Native Assets. Pure FFI linking — no widgets.

just_image_flutter #

Zero-config Flutter plugin for just_image — bridges the Rust-powered image processing engine to Flutter apps via Native Assets.

This package contains no widgets or UI code. It exists solely to declare ffiPlugin: true for all platforms, which tells Flutter's build system to invoke the hook/build.dart in just_image and bundle the compiled Rust library into your app binary.

Installation #

dependencies:
  just_image_flutter: ^1.0.0

That's it. No platform-specific setup, no CMakeLists.txt, no Podspec, no Gradle changes.

Prerequisites #

  • Flutter >= 3.22.0 (Dart SDK >= 3.10.8)
  • Rust toolchain installed (rustup.rs)
  • Native Assets experiment flag when building:
    flutter run --enable-experiment=native-assets
    flutter build apk --enable-experiment=native-assets
    

Platform-specific Rust targets #

For Android:

rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android

For iOS:

rustup target add aarch64-apple-ios x86_64-apple-ios

For macOS, Linux, and Windows the default host target is sufficient.

Usage #

Import the package — the full just_image API is re-exported:

import 'package:just_image_flutter/just_image_flutter.dart';

// Apply artistic filter + thumbnail
final result = await ImagePipeline(imageBytes)
    .filter('polaroid')
    .thumbnail(400, 300)
    .toFormat(ImageFormat.webp)
    .quality(85)
    .execute();

// BlurHash for placeholders
final engine = JustImageEngine();
final hash = await engine.blurHashEncode(imageBytes);
final placeholder = await engine.blurHashDecode(hash, width: 32, height: 32);

// Full pipeline
final processed = await ImagePipeline(imageBytes)
    .resize(1920, 1080)
    .sharpen(1.5)
    .toFormat(ImageFormat.avif)
    .quality(85)
    .execute();

File('output.avif').writeAsBytesSync(processed.data);

How it works #

┌──────────────────────────────────────────────┐
│  Your Flutter App                            │
│                                              │
│  ┌────────────────────────────────────────┐  │
│  │ just_image_flutter                     │  │
│  │  ffiPlugin: true (all platforms)       │  │
│  │  export just_image API                 │  │
│  └───────────────┬────────────────────────┘  │
│                  │ depends on                 │
│  ┌───────────────▼────────────────────────┐  │
│  │ just_image (core)                      │  │
│  │  ImagePipeline → NativeBridge (FFI)    │  │
│  │  hook/build.dart (Native Assets)       │  │
│  └───────────────┬────────────────────────┘  │
│                  │ compiles automatically     │
│  ┌───────────────▼────────────────────────┐  │
│  │ Rust native library                    │  │
│  │  image codecs, transforms, SIMD        │  │
│  └────────────────────────────────────────┘  │
└──────────────────────────────────────────────┘
  1. ffiPlugin: true tells Flutter to look for Native Assets hooks in dependencies
  2. hook/build.dart in just_image detects the target OS and architecture
  3. Cargo cross-compiles the Rust crate for the target
  4. Flutter bundles the .so / .dylib / .dll into the app binary
  5. dart:ffi DynamicLibrary.open() loads it at runtime

Platform support #

Platform Architectures Notes
Android arm64, arm, x64 Requires NDK + Rust targets
iOS arm64, x64 Simulator via x64
macOS arm64, x64
Linux x64, arm64
Windows x64, arm64 MSVC toolchain required

License #

See LICENSE.

1
likes
150
points
22
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Zero-config Flutter plugin for just_image. Bridges the Rust-powered image processing engine to Flutter apps on Android, iOS, macOS, Linux, and Windows via Native Assets. Pure FFI linking — no widgets.

Repository (GitHub)

Topics

#image #image-processing #flutter #ffi

License

MIT (license)

Dependencies

flutter, just_image

More

Packages that depend on just_image_flutter

Packages that implement just_image_flutter