Skip to content

Commit 5ee6bfb

Browse files
authored
Merge pull request #250 from appwrite/dev
Dev
2 parents 185e6b7 + ee53d24 commit 5ee6bfb

19 files changed

+51
-29
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Change Log
2+
3+
## 16.0.0
4+
5+
* Remove `Gif` from ImageFormat enum
6+
* Remove `search` param from `listExecutions` method
7+
* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage
8+
* Update default `quality` for `getFilePreview` from 0 to -1
9+
110
## 15.0.2
211

312
* Avoid setting empty `User-Agent` header and only encode it when present.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[![pub package](https://img.shields.io/pub/v/appwrite?style=flat-square)](https://pub.dartlang.org/packages/appwrite)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.6.x-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.7.x-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
99

10-
**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
10+
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
1111

1212
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1313

@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
2121

2222
```yml
2323
dependencies:
24-
appwrite: ^15.0.2
24+
appwrite: ^16.0.0
2525
```
2626
2727
You can install packages from the command line:

docs/examples/avatars/get-browser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getBrowser(
1111
code: Browser.avantBrowser,
1212
width: 0, // optional
1313
height: 0, // optional
14-
quality: 0, // optional
14+
quality: -1, // optional
1515
)
1616

1717
final file = File('path_to_file/filename.ext');
@@ -23,7 +23,7 @@ FutureBuilder(
2323
code: Browser.avantBrowser,
2424
width:0 , // optional
2525
height:0 , // optional
26-
quality:0 , // optional
26+
quality:-1 , // optional
2727
), // Works for both public file and private file, for private files you need to be logged in
2828
builder: (context, snapshot) {
2929
return snapshot.hasData && snapshot.data != null

docs/examples/avatars/get-credit-card.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getCreditCard(
1111
code: CreditCard.americanExpress,
1212
width: 0, // optional
1313
height: 0, // optional
14-
quality: 0, // optional
14+
quality: -1, // optional
1515
)
1616

1717
final file = File('path_to_file/filename.ext');
@@ -23,7 +23,7 @@ FutureBuilder(
2323
code: CreditCard.americanExpress,
2424
width:0 , // optional
2525
height:0 , // optional
26-
quality:0 , // optional
26+
quality:-1 , // optional
2727
), // Works for both public file and private file, for private files you need to be logged in
2828
builder: (context, snapshot) {
2929
return snapshot.hasData && snapshot.data != null

docs/examples/avatars/get-flag.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getFlag(
1111
code: Flag.afghanistan,
1212
width: 0, // optional
1313
height: 0, // optional
14-
quality: 0, // optional
14+
quality: -1, // optional
1515
)
1616

1717
final file = File('path_to_file/filename.ext');
@@ -23,7 +23,7 @@ FutureBuilder(
2323
code: Flag.afghanistan,
2424
width:0 , // optional
2525
height:0 , // optional
26-
quality:0 , // optional
26+
quality:-1 , // optional
2727
), // Works for both public file and private file, for private files you need to be logged in
2828
builder: (context, snapshot) {
2929
return snapshot.hasData && snapshot.data != null

docs/examples/databases/create-document.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import 'package:appwrite/appwrite.dart';
22

33
Client client = Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5-
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
5+
.setSession('') // The user session to authenticate with
6+
.setKey('') //
7+
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
68

79
Databases databases = Databases(client);
810

docs/examples/functions/list-executions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ Functions functions = Functions(client);
99
ExecutionList result = await functions.listExecutions(
1010
functionId: '<FUNCTION_ID>',
1111
queries: [], // optional
12-
search: '<SEARCH>', // optional
1312
);

docs/examples/storage/get-file-download.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Storage storage = Storage(client);
1010
UInt8List bytes = await storage.getFileDownload(
1111
bucketId: '<BUCKET_ID>',
1212
fileId: '<FILE_ID>',
13+
token: '<TOKEN>', // optional
1314
)
1415

1516
final file = File('path_to_file/filename.ext');
@@ -20,6 +21,7 @@ FutureBuilder(
2021
future: storage.getFileDownload(
2122
bucketId:'<BUCKET_ID>' ,
2223
fileId:'<FILE_ID>' ,
24+
token:'<TOKEN>' , // optional
2325
), // Works for both public file and private file, for private files you need to be logged in
2426
builder: (context, snapshot) {
2527
return snapshot.hasData && snapshot.data != null

docs/examples/storage/get-file-preview.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ UInt8List bytes = await storage.getFilePreview(
1313
width: 0, // optional
1414
height: 0, // optional
1515
gravity: ImageGravity.center, // optional
16-
quality: 0, // optional
16+
quality: -1, // optional
1717
borderWidth: 0, // optional
1818
borderColor: '', // optional
1919
borderRadius: 0, // optional
2020
opacity: 0, // optional
2121
rotation: -360, // optional
2222
background: '', // optional
2323
output: ImageFormat.jpg, // optional
24+
token: '<TOKEN>', // optional
2425
)
2526

2627
final file = File('path_to_file/filename.ext');
@@ -34,14 +35,15 @@ FutureBuilder(
3435
width:0 , // optional
3536
height:0 , // optional
3637
gravity: ImageGravity.center, // optional
37-
quality:0 , // optional
38+
quality:-1 , // optional
3839
borderWidth:0 , // optional
3940
borderColor:'' , // optional
4041
borderRadius:0 , // optional
4142
opacity:0 , // optional
4243
rotation:-360 , // optional
4344
background:'' , // optional
4445
output: ImageFormat.jpg, // optional
46+
token:'<TOKEN>' , // optional
4547
), // Works for both public file and private file, for private files you need to be logged in
4648
builder: (context, snapshot) {
4749
return snapshot.hasData && snapshot.data != null

docs/examples/storage/get-file-view.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Storage storage = Storage(client);
1010
UInt8List bytes = await storage.getFileView(
1111
bucketId: '<BUCKET_ID>',
1212
fileId: '<FILE_ID>',
13+
token: '<TOKEN>', // optional
1314
)
1415

1516
final file = File('path_to_file/filename.ext');
@@ -20,6 +21,7 @@ FutureBuilder(
2021
future: storage.getFileView(
2122
bucketId:'<BUCKET_ID>' ,
2223
fileId:'<FILE_ID>' ,
24+
token:'<TOKEN>' , // optional
2325
), // Works for both public file and private file, for private files you need to be logged in
2426
builder: (context, snapshot) {
2527
return snapshot.hasData && snapshot.data != null

0 commit comments

Comments
 (0)