1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Merge branch 'master' of github.com:appwrite/appwrite into 0.7.x

This commit is contained in:
Eldad Fux 2020-09-08 09:04:11 +03:00
commit c8730d6c90
74 changed files with 251 additions and 135 deletions

View file

@ -84,7 +84,7 @@ We use prettier for our JS coding standards and for auto-formatting our code.
Appwrite is built to scale. Please keep in mind that the Appwrite stack can run in different environments and different scales.
We wish Appwrite will be as easy to set up and in a single, localhost, and easy to grow to a large environment with thousands and even hundreds of instances.
We wish Appwrite will be as easy to set up and in a single, localhost, and easy to grow to a large environment with dozens and even hundreds of instances.
When contributing code, please take into account the following considerations:

View file

@ -7,7 +7,7 @@
<br />
</p>
[![Hacktoberfest](https://badgen.net/badge/hacktoberfest/friendly/pink)](#contributing)
[![Hacktoberfest](https://badgen.net/badge/hacktoberfest/friendly/pink)](CONTRIBUTING.md)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://discord.gg/GSeTUeA)
[![Docker Pulls](https://badgen.net/docker/pulls/appwrite/appwrite)](https://travis-ci.org/appwrite/appwrite)
[![Travis CI](https://badgen.net/travis/appwrite/appwrite?label=build)](https://travis-ci.org/appwrite/appwrite)

View file

@ -30,7 +30,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '0.2.3',
'version' => '0.3.0-dev.1',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'enabled' => true,
'beta' => true,
@ -45,7 +45,7 @@ return [
[
'key' => 'flutter-dev',
'name' => 'Flutter (Dev Channel)',
'version' => '0.2.3',
'version' => '0.3.2',
'url' => 'https://github.com/appwrite/sdk-for-flutter-dev',
'enabled' => true,
'beta' => true,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,16 @@
## 0.3.2
- Fixed package namespaces
## 0.3.1
- Downgraded meta package version to 1.1.8
## 0.3.0
- Updated package dependencies (@lohanidamodar)
- Added Flutter for Web compatibility (@lohanidamodar)
## 0.2.3
- Fixed OAuth2 cookie bug, where a new session cookie couldn&#039;t overwrite an old cookie

View file

@ -20,13 +20,13 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^0.2.3
appwrite_dev: ^0.3.2
```
You can install packages from the command line:
```bash
pub get appwrite
pub get appwrite_dev
```
## Contribution

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,5 +1,5 @@
import 'dart:io';
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -1,4 +1,4 @@
import 'package:appwrite/appwrite.dart';
import 'package:appwrite_dev/appwrite_dev.dart';
void main() { // Init SDK
Client client = Client();

View file

@ -0,0 +1,10 @@
export 'package:dio/dio.dart' show Response;
export 'client.dart';
export 'enums.dart';
export 'services/account.dart';
export 'services/avatars.dart';
export 'services/database.dart';
export 'services/locale.dart';
export 'services/storage.dart';
export 'services/teams.dart';

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:dio/adapter.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:cookie_jar/cookie_jar.dart';
@ -20,17 +21,21 @@ class Client {
PersistCookieJar cookieJar;
Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() {
type = (Platform.isIOS) ? 'ios' : type;
type = (Platform.isMacOS) ? 'macos' : type;
type = (Platform.isAndroid) ? 'android' : type;
type = (Platform.isLinux) ? 'linux' : type;
type = (Platform.isWindows) ? 'windows' : type;
type = (Platform.isFuchsia) ? 'fuchsia' : type;
// Platform is not supported in web so if web, set type to web automatically and skip Platform check
if(kIsWeb) {
type = 'web';
}else{
type = (Platform.isIOS) ? 'ios' : type;
type = (Platform.isMacOS) ? 'macos' : type;
type = (Platform.isAndroid) ? 'android' : type;
type = (Platform.isLinux) ? 'linux' : type;
type = (Platform.isWindows) ? 'windows' : type;
type = (Platform.isFuchsia) ? 'fuchsia' : type;
}
this.headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:dart:0.2.3',
'x-sdk-version': 'appwrite:flutter:0.3.2',
};
this.config = {};
@ -78,17 +83,20 @@ class Client {
Future init() async {
if(!initialized) {
final Directory cookieDir = await _getCookiePath();
cookieJar = new PersistCookieJar(dir:cookieDir.path);
// if web skip cookie implementation and origin header as those are automatically handled by browsers
if(!kIsWeb) {
final Directory cookieDir = await _getCookiePath();
cookieJar = new PersistCookieJar(dir:cookieDir.path);
this.http.interceptors.add(CookieManager(cookieJar));
PackageInfo packageInfo = await PackageInfo.fromPlatform();
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
}else{
// if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
this.http.options.extra['withCredentials'] = true;
}
this.http.options.baseUrl = this.endPoint;
this.http.options.validateStatus = (status) => status < 400;
this.http.interceptors.add(CookieManager(cookieJar));
PackageInfo packageInfo = await PackageInfo.fromPlatform();
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
}
}
@ -114,6 +122,10 @@ class Client {
}
if (method == HttpMethod.get) {
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
return http.get(path, queryParameters: params, options: options);
} else {
return http.request(path, data: params, options: options);

View file

@ -27,6 +27,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -55,6 +59,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -79,6 +87,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -106,6 +118,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -134,6 +150,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -161,6 +181,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,

View file

@ -124,6 +124,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -154,6 +158,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -178,6 +186,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,

View file

@ -1,5 +1,5 @@
name: appwrite
version: 0.2.3
name: appwrite_dev
version: 0.3.2
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
homepage: https://appwrite.io
repository: https://github.com/appwrite/sdk-for-flutter-dev
@ -9,30 +9,15 @@ environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:
meta: ^1.1.8
path_provider: ^1.6.5
package_info: ^0.4.0+16
dio: ^3.0.0
cookie_jar: ^1.0.0
path_provider: ^1.6.14
package_info: ^0.4.3
dio: ^3.0.10
cookie_jar: ^1.0.1
dio_cookie_manager: ^1.0.0
flutter_web_auth: ^0.2.4
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
sdk: flutter

View file

@ -1,3 +1,8 @@
## 0.3.0-dev.1
- Updated package dependencies (@lohanidamodar)
- Added Flutter for Web compatibility (@lohanidamodar)
## 0.2.3
- Fixed OAuth2 cookie bug, where a new session cookie couldn&#039;t overwrite an old cookie

View file

@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^0.2.3
appwrite: ^0.3.0-dev.1
```
You can install packages from the command line:

View file

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:dio/adapter.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:cookie_jar/cookie_jar.dart';
@ -20,17 +21,21 @@ class Client {
PersistCookieJar cookieJar;
Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() {
type = (Platform.isIOS) ? 'ios' : type;
type = (Platform.isMacOS) ? 'macos' : type;
type = (Platform.isAndroid) ? 'android' : type;
type = (Platform.isLinux) ? 'linux' : type;
type = (Platform.isWindows) ? 'windows' : type;
type = (Platform.isFuchsia) ? 'fuchsia' : type;
// Platform is not supported in web so if web, set type to web automatically and skip Platform check
if(kIsWeb) {
type = 'web';
}else{
type = (Platform.isIOS) ? 'ios' : type;
type = (Platform.isMacOS) ? 'macos' : type;
type = (Platform.isAndroid) ? 'android' : type;
type = (Platform.isLinux) ? 'linux' : type;
type = (Platform.isWindows) ? 'windows' : type;
type = (Platform.isFuchsia) ? 'fuchsia' : type;
}
this.headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:dart:0.2.3',
'x-sdk-version': 'appwrite:flutter:0.3.0-dev.1',
};
this.config = {};
@ -78,17 +83,20 @@ class Client {
Future init() async {
if(!initialized) {
final Directory cookieDir = await _getCookiePath();
cookieJar = new PersistCookieJar(dir:cookieDir.path);
// if web skip cookie implementation and origin header as those are automatically handled by browsers
if(!kIsWeb) {
final Directory cookieDir = await _getCookiePath();
cookieJar = new PersistCookieJar(dir:cookieDir.path);
this.http.interceptors.add(CookieManager(cookieJar));
PackageInfo packageInfo = await PackageInfo.fromPlatform();
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
}else{
// if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
this.http.options.extra['withCredentials'] = true;
}
this.http.options.baseUrl = this.endPoint;
this.http.options.validateStatus = (status) => status < 400;
this.http.interceptors.add(CookieManager(cookieJar));
PackageInfo packageInfo = await PackageInfo.fromPlatform();
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
}
}
@ -114,6 +122,10 @@ class Client {
}
if (method == HttpMethod.get) {
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
return http.get(path, queryParameters: params, options: options);
} else {
return http.request(path, data: params, options: options);

View file

@ -27,6 +27,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -55,6 +59,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -79,6 +87,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -106,6 +118,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -134,6 +150,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -197,6 +217,10 @@ class Avatars extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,

View file

@ -124,6 +124,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -154,6 +158,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,
@ -178,6 +186,10 @@ class Storage extends Service {
'project': client.config['project'],
};
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
params[key] = params[key].toString();
}});
Uri endpoint = Uri.parse(client.endPoint);
Uri location = new Uri(scheme: endpoint.scheme,
host: endpoint.host,

View file

@ -1,5 +1,5 @@
name: appwrite
version: 0.2.3
version: 0.3.0-dev.1
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
homepage: https://appwrite.io
repository: https://github.com/appwrite/sdk-for-flutter
@ -9,30 +9,15 @@ environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:
meta: ^1.1.8
path_provider: ^1.6.5
package_info: ^0.4.0+16
dio: ^3.0.0
cookie_jar: ^1.0.0
path_provider: ^1.6.14
package_info: ^0.4.3
dio: ^3.0.10
cookie_jar: ^1.0.1
dio_cookie_manager: ^1.0.0
flutter_web_auth: ^0.2.4
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
sdk: flutter

View file

@ -123,7 +123,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
break;
case 'flutter-dev':
$config = new Flutter();
$config->setPackageName('appwrite-dev');
$config->setPackageName('appwrite_dev');
break;
case 'dart':
$config = new Dart();

View file

@ -1,3 +1,16 @@
## 0.3.2
- Fixed package namespaces
## 0.3.1
- Downgraded meta package version to 1.1.8
## 0.3.0
- Updated package dependencies (@lohanidamodar)
- Added Flutter for Web compatibility (@lohanidamodar)
## 0.2.3
- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie

View file

@ -1,3 +1,8 @@
## 0.3.0-dev.1
- Updated package dependencies (@lohanidamodar)
- Added Flutter for Web compatibility (@lohanidamodar)
## 0.2.3
- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie