Thanks to @Brad suggestions, I set up rsync on windows and ssh in my mac. Step by step instructions below:
#!/bin/bash
# Define source and destination paths
SOURCE="/c/path/to/windowsdev/" # Adjust this path to your specific source folder on Windows
DESTINATION="user@host:/path/to/macdev/" # Use your Mac's username and host, and the correct path
# Run rsync to sync changes, excluding specific directories
rsync -avz --delete \
--exclude '.idea/' \
--exclude '.dart_tool/' \
--exclude 'build/' \
"$SOURCE" "$DESTINATION"