Skip to content

Commit 1f0e123

Browse files
committed
fix formatting and method names
1 parent 66c1268 commit 1f0e123

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

templates/flutter/docs/example.md.twig

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,23 @@ class MyApp extends StatelessWidget {
3030
),
3131
body: Container(
3232
child: FutureBuilder(
33-
future: storage.getFilePreview(fileId: [FileId] ), //works for both public file and private file, for private files you need to be logged in
34-
builder: (context, snapshot) {
35-
return snapshot.hasData && snapshot.data != null
36-
? Image.memory(
37-
snapshot.data.data,
38-
)
39-
: CircularProgressIndicator();
40-
},
41-
),
33+
future: {{ service.name | caseCamel }}.{{ method.name | caseCamel }}({% for parameter in method.parameters.all %}
34+
{% if loop.first %}
35+
36+
{% endif %}
37+
{% if parameter.required %}
38+
{{ parameter.name | caseCamel }}: {{ parameter | paramExample }},
39+
{% endif %}
40+
{% endfor %}{% if method.parameters.all|length > 0 %} {% endif %}
41+
), //works for both public file and private file, for private files you need to be logged in
42+
builder: (context, snapshot) {
43+
return snapshot.hasData && snapshot.data != null
44+
? Image.memory(
45+
snapshot.data.data,
46+
)
47+
: CircularProgressIndicator();
48+
},
49+
),
4250
)
4351
)
4452
}

0 commit comments

Comments
 (0)