Skip to content

Update Flutter SDK to add offline support - #618

Merged
lohanidamodar merged 2 commits into
masterfrom
feat-os-flutter
Mar 10, 2023
Merged

Update Flutter SDK to add offline support#618
lohanidamodar merged 2 commits into
masterfrom
feat-os-flutter

Conversation

@stnguyen90

@stnguyen90 stnguyen90 commented Feb 18, 2023

Copy link
Copy Markdown
Contributor

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

@lohanidamodar lohanidamodar left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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?

@lohanidamodar lohanidamodar left a comment

Copy link
Copy Markdown
Member

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 🙏🏻

Comment thread src/Spec/Swagger2.php Outdated
'offline' => [
'model' => $method['x-appwrite']['offline-model'] ?? '',
'key' => $method['x-appwrite']['offline-key'] ?? '',
'model' => $method['x-appwrite']['offline-model'] ?? '',

Copy link
Copy Markdown
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

Comment thread tests/languages/dart/tests.dart Outdated

// ID helper tests
print(ID.unique());
// print(ID.unique());

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

great idea!

Comment thread tests/languages/flutter/tests.dart Outdated

// ID helper tests
print(ID.unique());
// print(ID.unique());

Copy link
Copy Markdown
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
Copy Markdown
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

@abnegate abnegate left a comment

Copy link
Copy Markdown
Member

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 👍

Comment thread templates/flutter/lib/src/client_browser.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_browser.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_io.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_io.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_io.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_offline_mixin.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_offline_mixin.dart.twig Outdated
Comment thread templates/flutter/lib/src/offline_db.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_offline_mixin.dart.twig Outdated
Comment thread templates/flutter/lib/src/client_offline_mixin.dart.twig Outdated
@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