Skip to content
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 activity issue #1

Open
lonesomeranger opened this issue Feb 7, 2023 · 3 comments
Open

add activity issue #1

lonesomeranger opened this issue Feb 7, 2023 · 3 comments
Assignees

Comments

@lonesomeranger
Copy link

lonesomeranger commented Feb 7, 2023

Hi, I am doing the tutorial. I am new to flutter and aws. The tutorial is great and helps me to get into it better.

However I am stuck in tutorial two module 3.

Everything works good so far. But when opening add_activity_page.dart it is loading the activity for a few ms and then switching to CircularProgressIndicator().

It seems that the asyncvalue loses its object when the widget is build again:

tripValue.when(
    data: (trip) => SingleChildScrollView(...)
    loading: () => const Center(
          child: CircularProgressIndicator(),
    ),

grafik
grafik

Since the tripValue comes from tripProvider final tripValue = ref.read(tripProvider(tripId)); in trips_repository.dart as a ProviderStream and the get stream 'return tripsRepository.get(id);' comes from trips_datastore_service.dart and Stream<Trip> getTripStream(String id) and then from the Amplify.DataStore and everything is connected via riverpod I am completly lost how to debug everything. I do not understand why the tripValue appears for a few hundret ms and then disapears.

What is the best way to debug changes of an Stream that comes from Amplify.DataStore?
Why is this getTripStream() a stream at all? Wouldn't it be easier to just have a Future here?

Thanks

Markus

@offlineprogrammer offlineprogrammer self-assigned this Feb 7, 2023
@offlineprogrammer
Copy link
Contributor

Hi @lonesomeranger is this on Android or iOS? Did you checked if you are getting the trip from datastore?

You might need to reset the simulator between the tutorial's sections to pick up the changes on the schema

@Tehau
Copy link

Tehau commented Jun 29, 2023

Hello, same issue for me.
When i was in part 2, i redo all amplify set up but still have the same problems.

@offlineprogrammer
Copy link
Contributor

@Tehau Thanks for your comment. we are updating the tutorial and will look into this issue

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

No branches or pull requests

3 participants