Skip to content

Update Flutter SDK to add offline support #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2023
Merged

Conversation

stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented Feb 18, 2023

What does this PR do?

Update the Flutter SDK to add Offline Support.

Test Plan

Manual

Related PRs and Issues

TODO

Have you read the Contributing Guidelines on issues?

Yes

Copy link
Member

@lohanidamodar lohanidamodar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let's make sure the generated SDK looks good as well once we have changes to the API and swagger spec with updated requirement. We must update the mock endpoints to support these new functionalities as well.

@stnguyen90 stnguyen90 force-pushed the feat-os-flutter branch 3 times, most recently from 02fb129 to 9e7e0c4 Compare February 22, 2023 00:40
@stnguyen90
Copy link
Contributor Author

We must update the mock endpoints to support these new functionalities as well.

@lohanidamodar, what were you thinking we would do for the mock endpoints?

@lohanidamodar
Copy link
Member

We must update the mock endpoints to support these new functionalities as well.

@lohanidamodar, what were you thinking we would do for the mock endpoints?

Can we have mock endpoints with cache labels, and may be run test and check if data is cached?

Copy link
Member

@lohanidamodar lohanidamodar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left few comments. Let's also see the generated SDK with new Spec and this branch 🙏🏻

'offline' => [
'model' => $method['x-appwrite']['offline-model'] ?? '',
'key' => $method['x-appwrite']['offline-key'] ?? '',
'model' => $method['x-appwrite']['offline-model'] ?? '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'model' => $method['x-appwrite']['offline-model'] ?? '',

Looks like this was defined twice

@@ -114,7 +114,7 @@ void main() async {
print(Permission.update(Role.user(ID.custom('userid'), 'unverified')));

// ID helper tests
print(ID.unique());
// print(ID.unique());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this or we can test this by printing twice making sure it gives back unique ID each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great idea!

@@ -147,7 +147,7 @@ void main() async {
print(Permission.update(Role.user(ID.custom('userid'), 'unverified')));

// ID helper tests
print(ID.unique());
// print(ID.unique());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@stnguyen90
Copy link
Contributor Author

@lohanidamodar, I've updated the PR based on your feedback including adding the mock labels: appwrite/appwrite#5160

@stnguyen90 stnguyen90 force-pushed the feat-os-flutter branch 5 times, most recently from 3a1a9e2 to 50950e3 Compare March 3, 2023 01:42
Copy link
Member

@abnegate abnegate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some hard-coded Appwrite references to template 👍

@stnguyen90 stnguyen90 changed the title Feat os flutter Update Flutter SDK to add offline support Mar 9, 2023
@stnguyen90 stnguyen90 requested a review from abnegate March 9, 2023 03:52
@lohanidamodar lohanidamodar merged commit 6d2c065 into master Mar 10, 2023
@stnguyen90 stnguyen90 deleted the feat-os-flutter branch March 13, 2023 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants