Skip to content
pubscout

ir_sensor_plugin

0.3.1, released 2 years ago by an unverified publisher

Flutter plugin to control Android infrared emitter (IR) sensor.

WASM-ready
$ flutter pub add ir_sensor_plugin
Source repository

What it does

Provides methods to check for an IR emitter, query supported carrier frequencies, set transmission frequency, and transmit IR patterns as hex strings or integer lists. Works only on Android and requires the TRANSMIT_IR permission.

AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to send infrared commands from a Flutter app on Android devices (e.g., TV remote control).
  • You require direct control over carrier frequency and custom IR patterns.

Skip it when

  • Running on iOS or other platforms (the plugin will crash).
  • You need a cross‑platform solution for multiple sensors.

Strengths

  • Simple API focused on IR transmission.
  • Supports both hex string and integer list patterns.
  • Null‑safe and compatible with Flutter 3 and Dart 3.

Weaknesses

  • Android‑only; no iOS fallback.
  • Limited to infrared; no higher‑level abstractions or error handling details.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Add <uses-permission android:name="android.permission.TRANSMIT_IR"/> to AndroidManifest.xml. No additional Gradle steps required.

final bool hasIr = await IrSensorPlugin.hasIrEmitter;
final String freqs = await IrSensorPlugin.getCarrierFrequencies;
final String result = await IrSensorPlugin.transmitString(pattern: "0000 006d ...");

Alternatives

Packages that do the same job and could replace ir_sensor_plugin.

  • sensors_plus

    Provides a broader set of sensor APIs (accelerometer, gyroscope, etc.) and works on both Android and iOS, though it lacks IR-specific functions.