Skip to content

Commit ff994c3

Browse files
fix exports
1 parent 7430660 commit ff994c3

File tree

11 files changed

+25
-22
lines changed

11 files changed

+25
-22
lines changed

CHANGELOG.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
## 1.0.0
2-
- Support for Appwrite 0.10
3-
- Refactored for better cross platform support
4-
- Exception implements `toString()` to get proper error message for unhandled exceptions
5-
- Introduces new Realtime service, [more on official docs](link-to-realtime-docs)
6-
- Breaking Signature for `MultipartFile` has changed as now we are using `http` package. [Here is the new signature for MultipartFile](https://pub.dev/documentation/http/latest/http/MultipartFile-class.html)
7-
- Breaking Signature for `Response` has changed, now it only exposes the `data`.
8-
91
## 0.7.1
102
- Fix - createOAuth2Session completing too early
113

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
2121

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

lib/appwrite.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export 'src/client.dart';
1515
export 'src/exception.dart';
1616
export 'src/realtime.dart';
1717
export 'src/realtime_subscription.dart';
18+
export 'src/realtime_message.dart';
1819
export 'package:http/http.dart' show MultipartFile;
1920

2021
part 'services/account.dart';

lib/client_browser.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export 'src/client_browser.dart';

lib/client_io.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export 'src/client_io.dart';

lib/realtime_browser.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export 'src/realtime_browser.dart';

lib/realtime_io.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export 'src/realtime_io.dart';

lib/src/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
3333
.replaceFirst('http://', 'ws://');
3434
_headers = {
3535
'content-type': 'application/json',
36-
'x-sdk-version': 'appwrite:flutter:1.0.0',
36+
'x-sdk-version': 'appwrite:flutter:1.0.1',
3737
'X-Appwrite-Response-Format' : '0.10.0',
3838
};
3939

lib/src/client_io.dart

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ClientIO extends ClientBase with ClientMixin {
5252
.replaceFirst('http://', 'ws://');
5353
this._headers = {
5454
'content-type': 'application/json',
55-
'x-sdk-version': 'appwrite:flutter:1.0.0',
55+
'x-sdk-version': 'appwrite:flutter:1.0.1',
5656
'X-Appwrite-Response-Format' : '0.10.0',
5757
};
5858

@@ -192,11 +192,17 @@ class ClientIO extends ClientBase with ClientMixin {
192192

193193
Future webAuth(Uri url) {
194194
return FlutterWebAuth.authenticate(
195-
url: url.toString(),
196-
callbackUrlScheme: "appwrite-callback-" + config['project']!)
197-
.then((value) async {
198-
Cookie cookie = new Cookie(
199-
url.queryParameters['key']!, url.queryParameters['secret']!);
195+
url: url.toString(),
196+
callbackUrlScheme: "appwrite-callback-" + config['project']!,
197+
).then((value) async {
198+
Uri url = Uri.parse(value);
199+
final key = url.queryParameters['key'];
200+
final secret = url.queryParameters['secret'];
201+
if (key == null || secret == null) {
202+
throw AppwriteException(
203+
"Invalid OAuth2 Response. Key and Secret not available.", 500);
204+
}
205+
Cookie cookie = new Cookie(key, secret);
200206
cookie.domain = Uri.parse(_endPoint).host;
201207
cookie.httpOnly = true;
202208
cookie.path = '/';

lib/src/realtime_message.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ class RealtimeMessage {
5858
@override
5959
bool operator ==(Object other) {
6060
if (identical(this, other)) return true;
61-
61+
6262
return other is RealtimeMessage &&
63-
other.event == event &&
64-
mapEquals(other.payload, payload) &&
65-
listEquals(other.channels, channels) &&
66-
other.timestamp == timestamp;
63+
other.event == event &&
64+
mapEquals(other.payload, payload) &&
65+
listEquals(other.channels, channels) &&
66+
other.timestamp == timestamp;
6767
}
6868

6969
@override

0 commit comments

Comments
 (0)