You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*FlutterFlow usually warns you, but double-check!*
49
+
- Avoid using the same name for the action and any argument.
55
50
56
-
### Return Type Mismatch
57
-
- Ensure the custom action returns the correct data type as defined in the settings.
51
+

58
52
59
-

53
+
- **Reserved Keywords**
60
54
61
-
*The function should return the type specified in the settings panel.*
55
+
- Do not use Dart/Flutter reserved keywords as argument names. **Examples:** `abstract`, `else`, `import`, `show`, `as`, `enum`, `in`, `static`, `this`.
56
+
*FlutterFlow usually warns you, but double-check!*
62
57
63
-
### Internal Library Imports
64
-
- If importing internal libraries (e.g., `../../flutterflow`), set **Exclude from compilation** to `true` if needed.
58
+
- **Return Type Mismatch**
65
59
66
-
### Pubspec Dependencies
67
-
- Are all required dependencies included in both the code and the PubSpec?
60
+
- Ensure the custom action returns the correct data type as defined in the settings.
68
61
69
-

62
+

70
63
71
-
- Check for:
72
-
- Version conflicts (check on [pub.dev](https://pub.dev))
73
-
- Multiple versions of the same dependency
74
-
- Conflicts with FlutterFlow's auto-imported dependencies
64
+
*The function should return the type specified in the settings panel.*
75
65
76
-

66
+
- **Internal Library Imports**
77
67
78
-

68
+
- If importing internal libraries (e.g., `../../flutterflow`), set **Exclude from compilation** to `true` if needed.
79
69
80
-
### Code Errors
81
-
-**Null values:**
70
+
- **Pubspec Dependencies**
82
71
83
-
```dart
84
-
int example = passingIntWhichMayBeNullable ?? 0;
85
-
```
86
-
- **Correct data types:**
72
+
- Are all required dependencies included in both the code and the PubSpec?
87
73
88
-
```dart
89
-
String numberAsString = "5";
90
-
int example = thisWord; // ❌ Passing a string to an int
91
-
```
92
-
Use `.toString()`, `.toInt()`, `.toDouble()` as needed.
74
+

93
75
94
-
- **Single elements** vs **arrays:**
95
-
- Ensure you are not passing a single element where a list is expected, or vice versa.
76
+
Check for:
77
+
- Version conflicts (check on **[pub.dev](https://pub.dev)**)
78
+
- Multiple versions of the same dependency
79
+
- Conflicts with FlutterFlow's auto-imported dependencies
96
80
97
-
### Exclude from Compilation
98
-
If this is checked, code will not be error-checked during compilation, but will still run in Test/Run Mode.
81
+

99
82
100
-

83
+

101
84
102
-
### Duplicate Data Types/Structs
103
-
- Do not redefine data types or structs already defined in FlutterFlow's data schema panel.
85
+
- **Code Errors**
104
86
105
-

87
+
- **Null values:**
106
88
107
-
### Callback Data Types
108
-
- Ensure callback actions return the correct data type.
89
+
```js
90
+
int example = passingIntWhichMayBeNullable ?? 0;
91
+
```
92
+
- **Correct data types:**
109
93
110
-

94
+
```js
95
+
String numberAsString = "5";
96
+
int example = thisWord; // ❌ Passing a string to an int
97
+
```
98
+
Use `.toString()`, `.toInt()`, `.toDouble()` as needed.
111
99
100
+
- **Single elements** vs **arrays:**
101
+
- Ensure you are not passing a single element where a list is expected, or vice versa.
112
102
113
-
## 3. Additional Resources
103
+
- **Exclude from Compilation**
114
104
105
+
If this is checked, the code will not be error-checked during compilation, but will still run in Test/Run Mode.
106
+
107
+

108
+
109
+
- **Duplicate Data Types/Structs**
110
+
111
+
- Do not redefine data types or structs already defined in FlutterFlow's data schema panel.
112
+
113
+

114
+
115
+
- **Callback Data Types**
116
+
117
+
- Ensure callback actions return the correct data type.
Sometimes, the compiler does not show any errors in the custom action, but the custom action still won't work as expected. This might be due to the code logic or the implementation. In order to test the implementation and the flow, you can use the debug console to test the custom action in different scenarios.
11
9
12
-
## Steps for Implementation:
10
+
**Steps for Implementation**:
13
11
14
12
The core function that you can use to test the custom actions on the console is the **debugPrint** function in Flutter. To use that in the custom actions, follow these steps:
15
13
16
-
### Step 1
14
+
-**Step 1**
17
15
18
-
Use debugPrint to print some error on the debug console in case of a specific result. You can use if-else statements or try-catch statements in order to test the success of the scenario:
16
+
Use debugPrint to print some error on the debug console in case of a specific result. You can use if-else statements or try-catch statements in order to test the success of the scenario:
19
17
20
-

18
+

21
19
22
-
### Step 2
20
+
-**Step 2**
23
21
24
-
After the correct implementation in the code, use the action inside the app. On the run mode, open the console. Now you should be able to see the errors in the console upon performing the action.
22
+
After the correct implementation in the code, use the action inside the app. On the run mode, open the console. Now you should be able to see the errors in the console upon performing the action.
25
23
26
-

24
+

27
25
28
-
## Still having issues?
29
-
If you are still running into issues in your implementation after following the outlined steps, please contact support via chat in-app or email at [email protected].
26
+
:::info[Still having issues?]
27
+
If you are still running into issues in your implementation after following the outlined steps, please contact support at [email protected].
0 commit comments