Skip to main content

d_zero_sensor 0.1.6 copy "d_zero_sensor: ^0.1.6" to clipboard
d_zero_sensor: ^0.1.6 copied to clipboard

Zero-allocation C++17 FFI camera scanner (ZCameraScanner), 3D LiDAR point cloud, barcode scanner overlay, dynamic QR matrix generator, compass, and leveler widgets for Flutter.

⚡️ d_zero_sensor #

Zero-allocation C++17 FFI camera scanner (ZCameraScanner / ZZeroCamera), 3D LiDAR point cloud (Z3DPointCloud), camera bounding-box scanner overlay (ZBarcodeScanner), dynamic QR matrix generator (ZQRGenerator), gyroscope compass (ZCompass), and 2D spirit leveler (ZLeveler) widgets for Flutter and Impeller.

License: MIT Impeller: Vulkan & Metal


📦 Distributed Z Widgets & Controllers #

Widget Active Alias Controller / Listenable Zero-Allocation Architecture
ZCameraScanner ZZeroCamera ZeroCameraController Low-level C++17 704-byte (alignas(64), 11 cache lines) Seqlock shared-memory camera & QR/barcode scanner (ZeroCameraSharedState) with zero-copy YUV420 luma plane scanning, lock-free 64-slot ring buffer FPS sparkline, and ZeroNumberPainter HUD (0 Isolate copies, 0 TransferableTypedData, 0 TextPainter allocations).
Z3DPointCloud ZLidarView ZeroPointCloudController 3D spatial depth / LiDAR point cloud viewer storing (x, y, z, intensity) in SoA Float32List arrays and flushing depth-bucketed 3D projections via Canvas.drawRawPoints(PointMode.points).
ZBarcodeScanner ZCameraPreview ZeroDetectionController Stores up to capacity ML/barcode bounding boxes in a flat Float32List ([left, top, right, bottom, confidence]) and renders corner reticles, animated laser scan line, and ZeroNumberPainter.paintPercent confidence tags with 0 per-box widgets or strings.
ZCompass - ValueListenable<double> Pre-records 72 compass dial ticks into a GPU ui.Picture once on layout, rotates the canvas directly on heading updates, and renders center degrees (°) via ZeroNumberPainter.paintWithSuffix.
ZLeveler - ZeroTiltController 2D spirit bubble leveler storing (pitch, roll) in a Float32List(2), caching crosshair rings in a ui.Picture, and drawing pitch/roll degrees via ZeroNumberPainter.
ZQRGenerator ZMatrixCode ZeroQRCodeController Dynamic TOTP / ticket matrix code generator backed by a flat Uint8List(size * size) bitset, finder patterns, and a ZeroNumberPainter countdown footer (0 Container grid cells).

🚀 Installation & Usage #

dependencies:
  d_zero_sensor: ^0.1.0
import 'package:flutter/material.dart';
import 'package:d_zero_core/d_zero_core.dart';
import 'package:d_zero_sensor/d_zero_sensor.dart';

final detectionCtrl = ZeroDetectionController(capacity: 16)
  ..setDetection(0, 24.0, 24.0, 140.0, 96.0, 98.5);
final headingDeg = ZeroDoubleNotifier(125.0);
final tiltCtrl = ZeroTiltController(pitch: 1.5, roll: -0.8);

Row(
  children: [
    ZBarcodeScanner(controller: detectionCtrl, size: const Size(260, 160)),
    ZCompass(headingListenable: headingDeg, size: const Size(120, 120)),
    ZLeveler(controller: tiltCtrl, size: const Size(120, 120)),
  ],
);

📱 High-Load Comparison Benchmark App (example/) #

The example/ app streams 12 simultaneous ML detection bounding boxes and 120Hz IMU compass/tilt updates, comparing d_zero_sensor against traditional Stack + Positioned + Text overlays with live FPS, UI CPU Load (%), RSS Memory (MB), and Rebuild counters.

cd packages/d_zero_sensor/example
flutter run

📄 License #

MIT License © 2026 fexcy

0
likes
160
points
1.17k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Zero-allocation C++17 FFI camera scanner (ZCameraScanner), 3D LiDAR point cloud, barcode scanner overlay, dynamic QR matrix generator, compass, and leveler widgets for Flutter.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#sensor #compass #scanner #zero-allocation #impeller

License

MIT (license)

Dependencies

d_zero_core, ffi, flutter

More

Packages that depend on d_zero_sensor