Skip to content

Commit 3e4af02

Browse files
committed
Fix header casting and more minor fixes
1 parent d8303f7 commit 3e4af02

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.1
2+
3+
- Fix for image preview param types
4+
15
## 0.6.0
26

37
- Upgraded to Null-safety, minimum Dart SDK required 2.12.0

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add this to your package's `pubspec.yaml` file:
2424

2525
```yml
2626
dependencies:
27-
dart_appwrite: ^0.6.0
27+
dart_appwrite: ^0.6.1
2828
```
2929
3030
You can install packages from the command line:

docs/examples/functions/create-tag.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() { // Init SDK
1313
Future result = functions.createTag(
1414
functionId: '[FUNCTION_ID]',
1515
command: '[COMMAND]',
16-
code: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'),
16+
code: '',
1717
);
1818

1919
result

docs/examples/storage/create-file.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void main() { // Init SDK
1212
;
1313

1414
Future result = storage.createFile(
15-
file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'),
15+
file: '',
1616
);
1717

1818
result

lib/client.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Client {
1313

1414
this.headers = {
1515
'content-type': 'application/json',
16-
'x-sdk-version': 'appwrite:dart:0.6.0',
16+
'x-sdk-version': 'appwrite:dart:0.6.1',
1717
'X-Appwrite-Response-Format':'0.8.0',
1818
};
1919

lib/services/functions.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class Functions extends Service {
226226
///
227227
/// Use the "command" param to set the entry point used to execute your code.
228228
///
229-
Future<Response> createTag({required String functionId, required String command, required MultipartFile code}) {
229+
Future<Response> createTag({required String functionId, required String command, required String code}) {
230230
final String path = '/functions/{functionId}/tags'.replaceAll(RegExp('{functionId}'), functionId);
231231

232232
final Map<String, dynamic> params = {

lib/services/storage.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Storage extends Service {
3333
/// assigned to read and write access unless he has passed custom values for
3434
/// read and write arguments.
3535
///
36-
Future<Response> createFile({required MultipartFile file, List read = const [], List write = const []}) {
36+
Future<Response> createFile({required String file, List read = const [], List write = const []}) {
3737
final String path = '/storage/files';
3838

3939
final Map<String, dynamic> params = {
@@ -133,7 +133,7 @@ class Storage extends Service {
133133
/// and spreadsheets, will return the file icon image. You can also pass query
134134
/// string arguments for cutting and resizing your preview image.
135135
///
136-
Future<Response> getFilePreview({required String fileId, int width = 0, int height = 0, int quality = 100, int borderWidth = 0, String borderColor = '', int borderRadius = 0, int opacity = 1, int rotation = 0, String background = '', String output = ''}) {
136+
Future<Response> getFilePreview({required String fileId, int width = 0, int height = 0, int quality = 100, int borderWidth = 0, String borderColor = '', int borderRadius = 0, double opacity = 1, int rotation = 0, String background = '', String output = ''}) {
137137
final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId);
138138

139139
final Map<String, dynamic> params = {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 0.6.0
2+
version: 0.6.1
33
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

0 commit comments

Comments
 (0)