alarm
5.15.0, released 7 weeks ago by gdelataillade.me
A Flutter plugin to set and manage alarms on iOS and Android devices.
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.
- flutter_ringtone_player_plus
Play system ringtones, alarms, notifications and custom audio on Android and iOS.
68Compare - flutter_ringtone_player
A simple player plugin for system default ringtones, alarms and notifications.
59Compare - flutter_system_ringtones
Flutter plugin to list and preview system ringtones, alarms and notifications on Android and iOS.
57Compare - mic_stream_recorder
Record audio from the microphone with real-time amplitude monitoring and built-in playback.
50Compare
Works with
Packages commonly used together with alarm: ones it builds on, ones built on it, and its own family.
- json_annotationalarm depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- loggingalarm depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- plugin_platform_interfacealarm depends on itReusable base class for platform interfaces of Flutter federated plugins.
- shared_preferencesalarm depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
- equatablealarm depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- rxdartalarm depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- flutter_fgbgalarm depends on itDetects when the Flutter app goes to the background or foreground at the app level.