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

A production-grade Flutter plugin for advanced native system features (Background Services, Alarms, Hardware Control, System Info).

Native System Kit #

Advanced Native System APIs for Flutter

Native System Kit is a production-grade Flutter plugin that exposes advanced native operating system features on Android and iOS. It enables precise control over background execution, alarms, power management, hardware controls, and real-time system events, making it ideal for enterprise applications, kiosks, device management tools, and system utilities.


Overview #

Flutter applications operate within sandboxed environments that limit access to many low-level OS capabilities. Native System Kit bridges this gap by exposing critical system APIs through a unified, clean, and strongly typed Dart interface.

It enables:

  • Persistent background services
  • Exact alarm scheduling
  • Power and battery optimization control
  • System hardware management
  • Real-time system event monitoring

All while maintaining native performance and platform reliability.


Key Features #

Background Execution #

  • Persistent foreground services (Android)
  • Background task execution (iOS)
  • Service lifecycle control
  • Battery-optimized task scheduling

Alarm & Scheduling #

  • Exact alarm scheduling (Android 12+ compliant)
  • High-precision task triggers
  • Background notification triggering

Power Management #

  • CPU and screen wake locks
  • Battery saver state detection
  • Battery optimization exclusion handling

Device Hardware Control #

  • Flashlight control
  • System brightness control
  • Media volume control
  • Real-time hardware state synchronization

System Information #

  • Free and total RAM detection
  • Free and total disk space detection
  • Root and jailbreak detection

System Events #

  • Screen on/off detection
  • Power connected/disconnected detection
  • Low-memory and trim-memory lifecycle events

Platform Support #

Platform Minimum Version
Android API 23+ (6.0)
iOS 12.0+

Installation #

Add the dependency to your pubspec.yaml:

dependencies:
  native_system_kit: ^0.0.1

Then run:

flutter pub get

Platform Setup #

Android Configuration #

Add required permissions and service declarations to:

android/app/src/main/AndroidManifest.xml

<manifest ...>

    <!-- Foreground Services -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <!-- Power Management -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

    <!-- Exact Alarms (Android 12+) -->
    <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
    <uses-permission android:name="android.permission.USE_EXACT_ALARM" />

    <!-- Brightness Control -->
    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>

    <application ...>

        <service
            android:name="com.example.native_system_kit.NativeSystemKitService"
            android:foregroundServiceType="dataSync"
            android:exported="false" />

        <receiver
            android:name="com.example.native_system_kit.AlarmReceiver"
            android:exported="false" />

    </application>

</manifest>

iOS Configuration #

Enable background capabilities in Xcode:

  • Background fetch
  • Background processing

Add flashlight permission to Info.plist if using torch APIs:

<key>NSCameraUsageDescription</key>
<string>Camera access is required to enable flashlight functionality.</string>

Usage #

Device Hardware Control #

final kit = NativeSystemKit.instance;

// Flashlight
await kit.hardware.setFlashlight(true);

// Set brightness (prompts for permission on Android)
await kit.hardware.setBrightness(0.7);

// Listen for real-time changes
kit.events.eventStream.listen((event) {
  if (event == "VOLUME_CHANGED" || event == "BRIGHTNESS_CHANGED") {
    kit.hardware.getVolume().then(print);
  }
});

System Information #

final info = NativeSystemKit.instance.info;

int freeRam = await info.getFreeRam();
int totalDisk = await info.getTotalDiskSpace();
bool rooted = await info.isDeviceRooted();

print("Free RAM: ${freeRam / 1024 / 1024} MB");

Background Services #

await NativeSystemKit.instance.service.startPersistentService(
  title: "System Monitor",
  content: "Running background tasks",
);

// Stop service
await NativeSystemKit.instance.service.stopPersistentService();

Alarm Scheduling #

final alarm = NativeSystemKit.instance.alarm;

// Request permission (Android 12+)
if (await alarm.requestExactAlarmPermission()) {
  await alarm.scheduleExact(
    alarmId: "daily_sync",
    triggerTime: DateTime.now().add(const Duration(hours: 1)),
  );
}

Power Management #

final power = NativeSystemKit.instance.power;

// Acquire wake lock
await power.acquireWakeLock(timeout: 30000);

// Release wake lock
await power.releaseWakeLock();

Architecture Overview #

Flutter Application
        ↓
NativeSystemKit (Dart API Layer)
        ↓
Platform Channels
   (Method + Event Channels)
        ↓
Android (Kotlin)  → PowerManager, AlarmManager, System APIs
iOS (Swift)       → BackgroundTasks, Device APIs

This layered design ensures:

  • Native-level performance
  • Reliable background execution
  • Clean platform separation
  • Scalable system feature expansion

  • Enterprise device management
  • Kiosk and POS systems
  • Industrial monitoring
  • Healthcare monitoring
  • Logistics and fleet management
  • Background processing utilities

Roadmap #

  • JobScheduler abstraction
  • WorkManager integration
  • Persistent socket background tasks
  • Advanced power profiling APIs
  • System performance metrics

License #

MIT License © 2026 Designed for advanced Flutter system-level development.

1
likes
155
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A production-grade Flutter plugin for advanced native system features (Background Services, Alarms, Hardware Control, System Info).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_system_kit

Packages that implement native_system_kit