createAlarm static method
void
createAlarm({})
Creates an alarm at the specified hour and minutes.
Optionally alarm's title can also be specified and
whether clock app should open or not
using the skipUi flag.
Implementation
static void createAlarm({
required int hour,
required int minutes,
String title = '',
bool skipUi = true,
}) {
try {
if (Platform.isAndroid) {
_channel.invokeMethod('createAlarm', <String, dynamic>{
'hour': hour,
'minutes': minutes,
'title': title,
'skipUi': skipUi,
});
} else {
throw UnimplementedError();
}
} on PlatformException {
debugPrint('Error creating an alarm.');
}
}