File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,23 @@ void main() { // Init SDK
17
17
{% endfor %} ;
18
18
{% endif %}
19
19
{% if method .type == ' location' %}
20
+ // downloading file
21
+ Future result = {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% for parameter in method .parameters .all %}
22
+ {% if loop .first %}
23
+
24
+ {% endif %}
25
+ {% if parameter .required %}
26
+ {{ parameter .name | caseCamel }}: {{ parameter | paramExample }},
27
+ {% endif %}
28
+ {% endfor %}{% if method .parameters .all | length > 0 %} {% endif %}).then((bytes) {
29
+ final file = File('path_to_file/filename.ext');
30
+ file.writeAsBytesSync(bytes)
31
+ }).catchError((error) {
32
+ print(error.response);
33
+ })
20
34
}
21
35
22
- //displaying image
36
+ //displaying image preview
23
37
FutureBuilder(
24
38
future: {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% for parameter in method .parameters .all %}
25
39
{% if loop .first %}
You can’t perform that action at this time.
0 commit comments