Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.2.0]

* Upgrade to support Appwrite 0.14
* More on Appwrite's [Flutter SDK Changelog](https://pub.dev/packages/appwrite/changelog#500)

## [0.1.0] - 23 April, 2022

* First release
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

A Flutter wrapper for Appwrite's Accounts service, makes it easy to use manage authentication and account features.

**Under development. Not ready for production. Help get ready for production.**

## Getting Started
This is really very easy to use
1. Add dependency from git (Will only publish to pub if enough people are interested to use and help make it better.)
1. Add dependency

```yaml
dependencies:
appwrite_auth_kit:
git: https://github.com/lohanidamodar/appwrite_auth_kit
appwrite_auth_kit: <version>
```
1. Wrap your MaterialApp `FlAppwriteAccountKit` passing a properly initialized Appwrite Client. Example below:

Expand Down Expand Up @@ -51,7 +48,7 @@ class _MyAppState extends State<MyApp> {
```

2. Access `authNotifier` from `context`. `authNotifier` is an instance of `AuthNotifier` that provides all the functions of Appwrite's Account service and some easy way to handle authentication.
3. Get `context.authNotifier?.status` gets the authentication status which can be one of the `AuthStatus.uninitialized`, `AuthStatus.unauthenticated`, `AuthStatus.authenticating` and `AuthStatus.authenticated`. You can check the status and display the appropriate UI, for example
3. Get `context.authNotifier.status` gets the authentication status which can be one of the `AuthStatus.uninitialized`, `AuthStatus.unauthenticated`, `AuthStatus.authenticating` and `AuthStatus.authenticated`. You can check the status and display the appropriate UI, for example

```dart
class MainScreen extends StatelessWidget {
Expand Down
1 change: 1 addition & 0 deletions lib/appwrite_auth_kit.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library appwrite_auth_kit;

export 'package:appwrite/appwrite.dart';
export 'package:appwrite/models.dart';
export 'src/accounts_provider.dart';
4 changes: 2 additions & 2 deletions lib/src/accounts_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ class AuthNotifier extends ChangeNotifier {
}
}

Future<bool> delete() async {
Future<bool> updateStatus() async {
try {
await _account.delete();
await _account.updateStatus();
_getUser();
return true;
} on AppwriteException catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: appwrite_auth_kit
description: A wrapper for Appwrite's Accounts service, makes it easy to use
Accounts service, manage authentication and account features.
version: 0.1.0
version: 0.2.0
homepage: https://github.com/lohanidamodar/appwrite_auth_kit

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"

dependencies:
appwrite: ^4.0.2
appwrite: ^5.0.0
flutter:
sdk: flutter

Expand Down