-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add "Offline-first" architecture cookbook recipe #11425
Conversation
Visit the preview URL for this PR (updated for commit e553a10): https://flutter-docs-prod--pr11425-mb-offline-first-sypft802.web.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some rephrasing.
T _$identity<T>(T value) => value; | ||
|
||
final _privateConstructorUsedError = UnsupportedError( | ||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); | |
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the following documentation for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sfshaza2 this is a generated file by the freezed package, I'd not change it.
For example, using [Firebase messaging][], | ||
you can push small payloads of data to the device, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, using [Firebase messaging][], | |
you can push small payloads of data to the device, | |
For example, you can use [Firebase messaging][], | |
to push small payloads of data to the device, |
and as well, | ||
you can trigger synchronization tasks remotely using background messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and as well, | |
you can trigger synchronization tasks remotely using background messages. | |
as well as trigger synchronization tasks remotely using background messages. |
you can trigger synchronization tasks remotely using background messages. | ||
|
||
Instead of having a synchronization task running in the background, | ||
the server will notify the application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the server will notify the application | |
the server notifies the application |
|
||
Instead of having a synchronization task running in the background, | ||
the server will notify the application | ||
when the stored data needs to be updated via a push notification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the stored data needs to be updated via a push notification. | |
when the stored data needs to be updated with a push notification. |
## Putting it all together | ||
|
||
Writing an offline-first application | ||
requires making different decisions regarding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires making different decisions regarding | |
requires making decisions regarding |
OR change "different" to "several".
Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Description of what this PR is changing or adding, and why:
Following PRs #11410 and #11394 this PR adds the "Offline-first" cookbook recipe for the Architecture design patterns.
Issues fixed by this PR (if any):
Part of #11374
PRs or commits this PR depends on (if any):
Presubmit checklist