Replies: 1 comment
-
|
@niels-hb Have you tried setting the type as class Chart extends ConsumerStatefulWidget {
const Chart({
required this.provider,
});
final ProviderBase<AsyncValue<TimeSeries>> provider;
[...]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Riverpod community,
I'm trying to create a generic widget that receives a provider as the constructor argument and watches this provider in the build method of the Widget.
The signature of the provider looks like this:
The widget's constructor:
The consumer:
As you can see, I chose the type "BookingStatisticsFamily" as I wasn't sure if there are any supertypes available that would match any provider with the given return type and arguments.
My question is twofold:
Beta Was this translation helpful? Give feedback.
All reactions