Skip to content

Commit 9c9865c

Browse files
authored
Merge pull request #1212 from appwrite/fix-flutter-string-interpolation
Use string interpolation instead of concatenation in Dart/Flutter
2 parents c30701f + 722b3a1 commit 9c9865c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

templates/dart/lib/src/client_browser.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
122122
try {
123123
res = await call(
124124
HttpMethod.get,
125-
path: path + '/' + params[idParamName],
125+
path: '$path/${params[idParamName]}',
126126
headers: headers,
127127
);
128128
final int chunksUploaded = res.data['chunksUploaded'] as int;

templates/dart/lib/src/client_io.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class ClientIO extends ClientBase with ClientMixin {
143143
try {
144144
res = await call(
145145
HttpMethod.get,
146-
path: path + '/' + params[idParamName],
146+
path: '$path/${params[idParamName]}',
147147
headers: headers,
148148
);
149149
final int chunksUploaded = res.data['chunksUploaded'] as int;

templates/flutter/lib/src/client_browser.dart.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
150150
try {
151151
res = await call(
152152
HttpMethod.get,
153-
path: path + '/' + params[idParamName],
153+
path: '$path/${params[idParamName]}',
154154
headers: headers,
155155
);
156156
final int chunksUploaded = res.data['chunksUploaded'] as int;
@@ -243,7 +243,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
243243
Future webAuth(Uri url, {String? callbackUrlScheme}) {
244244
return FlutterWebAuth2.authenticate(
245245
url: url.toString(),
246-
callbackUrlScheme: "{{spec.title | caseLower}}-callback-" + config['project']!,
246+
callbackUrlScheme: "{{spec.title | caseLower}}-callback-${config['project']!}",
247247
options: const FlutterWebAuth2Options(useWebview: false),
248248
);
249249
}

templates/flutter/lib/src/client_io.dart.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class ClientIO extends ClientBase with ClientMixin {
272272
try {
273273
res = await call(
274274
HttpMethod.get,
275-
path: path + '/' + params[idParamName],
275+
path: '$path/${params[idParamName]}',
276276
headers: headers,
277277
);
278278
final int chunksUploaded = res.data['chunksUploaded'] as int;
@@ -333,7 +333,7 @@ class ClientIO extends ClientBase with ClientMixin {
333333
url: url.toString(),
334334
callbackUrlScheme: callbackUrlScheme != null && _customSchemeAllowed
335335
? callbackUrlScheme
336-
: "{{spec.title | caseLower}}-callback-" + config['project']!,
336+
: "{{spec.title | caseLower}}-callback-${config['project']!}",
337337
options: const FlutterWebAuth2Options(
338338
intentFlags: ephemeralIntentFlags,
339339
useWebview: false,

0 commit comments

Comments
 (0)