Skip to content

Commit 6d1eebd

Browse files
committed
update to appwrite 1.3.0
1 parent 811bd17 commit 6d1eebd

26 files changed

+427
-86
lines changed

CHANGELOG.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
## 8.3.0
2-
3-
* Fix: back navigation bringing back web browser after OAuth session creation
4-
* Update: Deprecated `InputFile` default constructor and introduced `InputFile.fromPath` and `InputFile.fromBytes` for consistency with other SDKs
5-
6-
## 8.2.2
7-
8-
* Fix: notify callback when websocket closes [#604](https://github.com/appwrite/sdk-generator/pull/604)
9-
10-
## 8.2.1
11-
12-
* Fix OAuth on web
13-
* Improve helper classes
14-
151
## 8.2.0
162

173
* Support for GraphQL

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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.2.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.3.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

@@ -27,7 +27,7 @@ dependencies:
2727
You can install packages from the command line:
2828
2929
```bash
30-
pub get appwrite
30+
flutter pub add appwrite
3131
```
3232

3333

@@ -51,7 +51,7 @@ In order to capture the Appwrite OAuth callback url, the following activity need
5151
<application ...>
5252
....
5353
<!-- Add this inside the <application> tag, along side the existing <activity> tags -->
54-
<activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" >
54+
<activity android:exported="true" android:name="com.linusu.flutter_web_auth_2.CallbackActivity" >
5555
<intent-filter android:label="flutter_web_auth_2">
5656
<action android:name="android.intent.action.VIEW" />
5757
<category android:name="android.intent.category.DEFAULT" />

docs/examples/account/create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void main() { // Init SDK
1111
Future result = account.create(
1212
userId: '[USER_ID]',
1313
14-
password: 'password',
14+
password: '',
1515
);
1616

1717
result

docs/examples/account/update-password.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111
Future result = account.updatePassword(
12-
password: 'password',
12+
password: '',
1313
);
1414

1515
result

docs/examples/teams/create-membership.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ void main() { // Init SDK
1010
;
1111
Future result = teams.createMembership(
1212
teamId: '[TEAM_ID]',
13-
1413
roles: [],
1514
url: 'https://example.com',
1615
);

docs/examples/teams/get-prefs.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import 'package:appwrite/appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Teams teams = Teams(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
Future result = teams.getPrefs(
12+
teamId: '[TEAM_ID]',
13+
);
14+
15+
result
16+
.then((response) {
17+
print(response);
18+
}).catchError((error) {
19+
print(error.response);
20+
});
21+
}

docs/examples/teams/update.md renamed to docs/examples/teams/update-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void main() { // Init SDK
88
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
11-
Future result = teams.update(
11+
Future result = teams.updateName(
1212
teamId: '[TEAM_ID]',
1313
name: '[NAME]',
1414
);

docs/examples/teams/update-prefs.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:appwrite/appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Teams teams = Teams(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
Future result = teams.updatePrefs(
12+
teamId: '[TEAM_ID]',
13+
prefs: {},
14+
);
15+
16+
result
17+
.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
22+
}

lib/models.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ part 'src/models/currency_list.dart';
1515
part 'src/models/phone_list.dart';
1616
part 'src/models/document.dart';
1717
part 'src/models/log.dart';
18-
part 'src/models/account.dart';
18+
part 'src/models/user.dart';
19+
part 'src/models/algo_md5.dart';
20+
part 'src/models/algo_sha.dart';
21+
part 'src/models/algo_phpass.dart';
22+
part 'src/models/algo_bcrypt.dart';
23+
part 'src/models/algo_scrypt.dart';
24+
part 'src/models/algo_scrypt_modified.dart';
25+
part 'src/models/algo_argon2.dart';
1926
part 'src/models/preferences.dart';
2027
part 'src/models/session.dart';
2128
part 'src/models/token.dart';

lib/query.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ class Query {
2424
static search(String attribute, String value) =>
2525
_addQuery(attribute, 'search', value);
2626

27+
static isNull(String attribute) => 'isNull("$attribute")';
28+
29+
static isNotNull(String attribute) => 'isNotNull("$attribute")';
30+
31+
static between(String attribute, dynamic start, dynamic end) =>
32+
_addQuery(attribute, 'between', [start, end]);
33+
34+
static startsWith(String attribute, String value) =>
35+
_addQuery(attribute, 'startsWith', value);
36+
37+
static endsWith(String attribute, String value) =>
38+
_addQuery(attribute, 'endsWith', value);
39+
40+
static select(List<String> attributes) => 'select([${attributes.map((attr) => "\"$attr\"").join(",")}])';
41+
2742
static String orderAsc(String attribute) => 'orderAsc("$attribute")';
2843

2944
static String orderDesc(String attribute) => 'orderDesc("$attribute")';

0 commit comments

Comments
 (0)