createOrUpdateActivity method

  1. @override
Future createOrUpdateActivity(
  1. String customId,
  2. Map<String, dynamic> data, {
  3. bool removeWhenAppIsKilled = false,
  4. Duration? staleIn,
})
override

Implementation

@override
Future createOrUpdateActivity(
  String customId,
  Map<String, dynamic> data, {
  bool removeWhenAppIsKilled = false,
  Duration? staleIn,
}) async {
  final staleInMinutes =
      (staleIn?.inMinutes ?? 0) >= 1 ? staleIn?.inMinutes : null;
  return methodChannel.invokeMethod('createOrUpdateActivity', {
    'customId': customId,
    'data': data,
    'removeWhenAppIsKilled': removeWhenAppIsKilled,
    'staleIn': staleInMinutes,
  });
}