Skip to content

Commit d09a4db

Browse files
Merge pull request #204 from lohanidamodar/fix-flutter-dart
fix issue with null removal
2 parents cac7e34 + 71c6959 commit d09a4db

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

templates/dart/lib/client.dart.twig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ class Client {
6868
};
6969
}
7070

71-
params.keys.forEach((key) {
72-
if (params[key] == null) {
73-
params.remove(key);
74-
}
75-
});
71+
params.removeWhere((key,value) => value == null);
7672

7773
// Origin is hardcoded for testing
7874
Options options = Options(

templates/flutter/lib/client.dart.twig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ class Client {
134134
await this.init();
135135
}
136136

137-
params.keys.forEach((key) {
138-
if (params[key] == null) {
139-
params.remove(key);
140-
}
141-
});
137+
params.removeWhere((key,value) => value == null);
142138

143139
// Origin is hardcoded for testing
144140
Options options = Options(

0 commit comments

Comments
 (0)