Skip to content
pubscout

alarm

5.15.0, released 7 weeks ago by gdelataillade.me

A Flutter plugin to set and manage alarms on iOS and Android devices.

$ flutter pub add alarm
Source repository

What it does

Allows you to set, cancel, and listen to alarms on iOS and Android. It handles audio playback, system volume control, vibrations, and notifications using native code.

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

Use it when

  • You need to build a clock or alarm app with custom sounds and notifications.
  • You require alarms to trigger even when the app is in the background or terminated.

Skip it when

  • You only need basic background task execution without user-facing alarms.

Strengths

  • Supports custom audio assets, looping, and vibrations.
  • Handles volume control and fading settings.
  • Provides event streams for tracking alarm states and updates.

Weaknesses

  • Requires manual native setup for both iOS and Android.
  • Some features behave differently depending on the operating system.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
8

Requires following specific iOS and Android installation guides for native permissions and capabilities.

WidgetsFlutterBinding.ensureInitialized();
await Alarm.init();

final alarmSettings = AlarmSettings(
  id: 42,
  dateTime: DateTime.now().add(const Duration(seconds: 10)),
  assetAudioPath: 'assets/alarm.mp3',
);
await Alarm.set(alarmSettings: alarmSettings);

Alternatives

Packages that do the same job and could replace alarm.

Works with

Packages commonly used together with alarm: ones it builds on, ones built on it, and its own family.