1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Changed Dart SDK to Flutter SDK

This commit is contained in:
Eldad Fux 2020-05-17 09:47:01 +03:00
parent 8d314216d6
commit 70ee273fe9
77 changed files with 97 additions and 216 deletions

View file

@ -20,7 +20,7 @@ return [
'languages' => [
[
'key' => 'javascript',
'name' => 'JavaScript',
'name' => 'Web',
'version' => '1.0.29',
'url' => 'https://github.com/appwrite/sdk-for-js',
'enabled' => true,
@ -32,19 +32,6 @@ return [
'gitRepoName' => 'sdk-for-js',
'gitUserName' => 'appwrite',
],
[
'key' => 'typescript',
'name' => 'TypeScript',
'url' => '',
'enabled' => false,
'beta' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'typescript',
'source' => false,
'gitUrl' => 'git@github.com:appwrite/sdk-for-typescript.git',
'gitRepoName' => 'sdk-for-typescript',
'gitUserName' => 'appwrite',
],
],
],
@ -128,16 +115,16 @@ return [
'beta' => true,
'languages' => [
[
'key' => 'dart',
'name' => 'Dart',
'key' => 'flutter',
'name' => 'Flutter',
'version' => '0.1.1',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'enabled' => true,
'beta' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'dart',
'source' => realpath(__DIR__ . '/../sdks/flutter-dart'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git',
'source' => realpath(__DIR__ . '/../sdks/flutter-flutter'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-flutter.git',
'gitRepoName' => 'sdk-for-dart',
'gitUserName' => 'appwrite',
],

View file

@ -1,86 +0,0 @@
{
"configVersion": 2,
"packages": [
{
"name": "charcode",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "collection",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "cookie_jar",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/cookie_jar-1.0.1",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "dio",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "dio_cookie_manager",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/dio_cookie_manager-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "http_parser",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "meta",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8",
"packageUri": "lib/",
"languageVersion": "1.12"
},
{
"name": "path",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path-1.6.4",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "source_span",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "string_scanner",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "term_glyph",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0",
"packageUri": "lib/",
"languageVersion": "1.8"
},
{
"name": "typed_data",
"rootUri": "file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "appwrite",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.6"
}
],
"generated": "2020-04-10T18:56:11.631386Z",
"generator": "pub",
"generatorVersion": "2.7.2"
}

View file

@ -1,5 +0,0 @@
# This is a generated file; do not edit or check into version control.
flutter_web_auth=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/flutter_web_auth-0.1.3/
package_info=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+16/
path_provider=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/
path_provider_macos=/Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/

View file

@ -1 +0,0 @@
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_web_auth","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]}]}

View file

@ -1,14 +0,0 @@
# Generated by pub on 2020-04-10 21:56:11.618646.
charcode:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3/lib/
collection:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/
cookie_jar:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/cookie_jar-1.0.1/lib/
dio:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9/lib/
dio_cookie_manager:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/dio_cookie_manager-1.0.0/lib/
http_parser:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4/lib/
meta:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/
path:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
source_span:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0/lib/
string_scanner:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
term_glyph:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
typed_data:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
appwrite:lib/

View file

@ -1,89 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
cookie_jar:
dependency: "direct main"
description:
name: cookie_jar
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.9"
dio_cookie_manager:
dependency: "direct main"
description:
name: dio_cookie_manager
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
meta:
dependency: "direct main"
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
sdks:
dart: ">=2.6.0 <3.0.0"

View file

@ -7,7 +7,7 @@
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
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 Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
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)

View file

@ -4,7 +4,7 @@
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
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 JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
Use the Web 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)
![Appwrite](https://appwrite.io/images/github.png)

View file

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

View file

@ -0,0 +1,33 @@
## 0.1.1
- Updated flutter_web_auth version
## 0.1.0
- Added examples file
- Some minor style fixes
## 0.0.14
- Using MultipartFile for file uploads
## 0.0.13
- Fix for file upload method
## 0.0.12
- Added file upload support for storage service
## 0.0.11
- Added integration with web auth plugin to support Appwrite OAuth API
## 0.0.9
- Updated deafult params
## 0.0.8
- Fixed compilation error in Client class
- Shorter description for package

View file

@ -0,0 +1,55 @@
# Examples
Init your Appwrite client:
```dart
Client client = Client();
client
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('5e8cf4f46b5e8') // Your project ID
.setSelfSigned() // Remove in production
;
```
Create a new user and session:
```dart
Account account = Account(client);
Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name');
Response session = await account.createSession(email: 'me@appwrite.io', password: 'password');
```
Fetch user profile:
```dart
Account account = Account(client);
Response profile = await account.get();
```
Upload File:
```dart
Storage storage = Storage(client);
MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg');
storage.createFile(
file: file,
read: ['*'],
write: []
)
.then((response) {
print(response); // File uploaded!
})
.catchError((error) {
print(error.response);
});
```
All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs)