-
Notifications
You must be signed in to change notification settings - Fork 25
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
Constant loading #89
Comments
Do you have a proposal on how you intend to move this along that we can discuss for action? The current strategy is to get the app to feature completion, before we can start on optimization around these issues, but since this has come up now, we can have a discussion around this. |
Understood. I lean towards caching the data locally and then hiding the refresh from users whenever any data is available. When there is no data, the loading can be shown to the user. Various approaches are available for caching. We can use We can alternatively use |
The app is currently Android & iOS only. The sessions tab currently uses We can move forward with |
I noticed it didn't visually refresh. I propose we do the same for the other screens. We can discuss the issues and a strategy to work towards offline-first functionality. |
Yes. We can do that. But for now, this is on hold, until we are done with a couple of other things to prevent unpleasant merge conflicts. |
Will go with the approach of using Isar (https://isar.dev/tutorials/quickstart.html) for this. Ideally a great database to help with persisting data so that users can navigate sessions quickly without having to wait for a data load each time. |
This is well in order @MillerAdulu. BTW, there is a way of creating |
Do share a sample. I am not aware of this approach. |
Add these changes to
Define these constants: |
Collections will then be defined as shown below: @unfreezed factory CollectionClass.fromJson(Map<String, dynamic> json) => CollectionClass._(); Id get id => Isar.autoIncrement; |
Then to enable migrations: The properties on Embedded classes are defined as null or with default arguments like so: @freezed factory EmbeddedClass.fromJson(Map<String, dynamic> json) => _$EmbeddedClassFromJson(json); |
Managed to check this out working on #96. However, my concern with the embedded objects is data integrity. Another additional question I have is, assuming an app where data comes in via different formats (eg Websocket & an HTTP API), we can define different |
I see. However from experience, having the code generated with nullable embedded classes didn't change much. The difference was only at the part where the class objects had to be referenced. On this sections, null fallbacks were used. But again this could be avoided by using Default arguments. If by data decoding mechanisms, you're referring to the However, the approach makes sense when the data-from-different-sources factor is considered. The challenge may be on ensuring that both the Collection and Embedded model classes are consistent when changes are made to either of them. For this, I propose that we add documentation for the model classes like so Say this is Class
The RoomCollection class is then made referenceable by importing the file into which it is defined. This can be done for the Embedded classes too. |
Having a look at #96 |
At the moment, I am having a bit of an issue accepting that we should have many annotations across different packages on one model. The other enquiry: When a model has |
I suggest using custom property names in combination with |
I tried this and there was a collision. Which I wasn't able to test by renaming the |
The app is constantly loading when switching between different screens. The experience is a bit draining from the waiting one has to do every time.
The text was updated successfully, but these errors were encountered: