createActivity method
Implementation
@override
Future<String?> createActivity(
Map<String, dynamic> data, {
bool removeWhenAppIsKilled = false,
Duration? staleIn,
}) async {
// If the duration is less than 1 minute then pass a null value instead of using 0 minutes
final staleInMinutes =
(staleIn?.inMinutes ?? 0) >= 1 ? staleIn?.inMinutes : null;
return methodChannel.invokeMethod<String>('createActivity', {
'data': data,
'removeWhenAppIsKilled': removeWhenAppIsKilled,
'staleIn': staleInMinutes,
});
}