FFDatabaseAction constructor

FFDatabaseAction({
  1. FFFirestoreCreate? createDocument,
  2. FFFirestoreUpdate? updateDocument,
  3. FFApiCall? apiCall,
  4. FFFirestoreDelete? deleteDocument,
  5. @Deprecated('This field is deprecated.') FFAction? onSuccess,
  6. @Deprecated('This field is deprecated.') FFAction? onFailure,
  7. bool? blockSubsequentActionsOnFailure,
  8. FFPostgresAction? postgresAction,
  9. FFSQLiteQueryCall? sqliteQueryCall,
  10. FFFirestoreQuery? firestoreQuery,
  11. FFParameter? returnParameter,
  12. FFFirestoreDocument? readDocument,
})

Implementation

factory FFDatabaseAction({
  FFFirestoreCreate? createDocument,
  FFFirestoreUpdate? updateDocument,
  FFApiCall? apiCall,
  FFFirestoreDelete? deleteDocument,
  @$core.Deprecated('This field is deprecated.') FFAction? onSuccess,
  @$core.Deprecated('This field is deprecated.') FFAction? onFailure,
  $core.bool? blockSubsequentActionsOnFailure,
  FFPostgresAction? postgresAction,
  FFSQLiteQueryCall? sqliteQueryCall,
  FFFirestoreQuery? firestoreQuery,
  FFParameter? returnParameter,
  FFFirestoreDocument? readDocument,
}) {
  final result = create();
  if (createDocument != null) result.createDocument = createDocument;
  if (updateDocument != null) result.updateDocument = updateDocument;
  if (apiCall != null) result.apiCall = apiCall;
  if (deleteDocument != null) result.deleteDocument = deleteDocument;
  if (onSuccess != null) result.onSuccess = onSuccess;
  if (onFailure != null) result.onFailure = onFailure;
  if (blockSubsequentActionsOnFailure != null)
    result.blockSubsequentActionsOnFailure = blockSubsequentActionsOnFailure;
  if (postgresAction != null) result.postgresAction = postgresAction;
  if (sqliteQueryCall != null) result.sqliteQueryCall = sqliteQueryCall;
  if (firestoreQuery != null) result.firestoreQuery = firestoreQuery;
  if (returnParameter != null) result.returnParameter = returnParameter;
  if (readDocument != null) result.readDocument = readDocument;
  return result;
}