aws-samples / aws-samples/amplify-trips-planner
add activity issue
- Dominant language
- Dart
- Stars
- 11
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
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(),
),
```


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 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
Contributor guide
Assessment
This issue has not been assessed yet.