Flutter Agent FAQ
Q. How can I check debugging log messages?
A. Here is how you can check log messages generated by the NetFUNNEL Flutter Agent:
-
Set
printLog=truein the initialization function. -
Check log messages with
[NF4]prefix in the Flutter console.
info
It is recommended to use printLog=false when releasing your app.
Q. How can I apply different settings for different environments?
A. You can use the profile parameter in Netfunnel.instance.initialize() to apply environment-specific settings.
// Production environment (Tokyo)
await Netfunnel.instance.initialize(profile: 'prod_tokyo', ...);
// Production environment (US East)
await Netfunnel.instance.initialize(profile: 'prod_us_east', ...);
Q. I am encountering errors when using HTTP communication.
A. NetFUNNEL Flutter Agent recommends using HTTPS communication by default. If you need to use HTTP, you can allow HTTP traffic through platform-specific settings.
Android
- Create the file
android/app/src/main/res/xml/network_security_config.xml:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">{{DOMAIN_URL}}</domain>
</domain-config>
</network-security-config>
- Add settings to
android/app/src/main/AndroidManifest.xml:
<application
android:networkSecurityConfig="@xml/network_security_config"
... >
</application>
iOS
- Add the following to
ios/Runner/Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Q. How can I check the agent version?
A. You can use the getVersion() function to check the agent version.
| Function Name | Parameter | Return Value | Description |
|---|---|---|---|
| getVersion | N/A | String | Returns (checks) the version of the NetFUNNEL agent |