If you are running the example on macOS, make sure you add the following entitlement in macos/Runner/Debugprofile.entitlements:
macos/Runner/Debugprofile.entitlements
<key>com.apple.security.network.client</key> <true/>