The argument type 'HWFamily' can't be assigned to the parameter type 'ProviderListenable' I'm following the example in https://carltonaikins.me/how-to-use-riverpod-2-generator-in-your-flutter-project and I now have ...
@riverpod
class HW extends _$HW {
 @override
 dynamic build(foo) => 'HelloWorld'; // without foo, I get build dynamic Function() is not a valid override of build (dynamic Function(dynamic)
}    

return Consumer(builder: (context, ref, child) {
   var s1 = ref.watch(hWProvider);   // gives The argument type 'HWFamily' can't be assigned to the parameter type 'ProviderListenable<dynamic>'. 
   var s2 = ref.watch(hWProvider.notifier);   // gives The getter 'notifier' isn't defined for the type 'HWFamily'.
   var s3 = ref.watch(hWProvider.call('foo');   // seems to work
...

I don't understand if I'm doing something wrong, or the example I'm following is somehow out of date? If the latter, is there a better example to follow?
What is the significance of foo?
Versions:-

*

*flutter_riverpod: 2.1.3

*riverpod_annotation: 1.1.1

*riverpod_generator: 1.1.1

EDIT
I suspect this might be a problem with the build process. I killed the watch process, deleted main.g.dart, removed "foo", restarted the watch, and now everything works as it should. Somehow the "foo" (which I added to get past the override error) was creating a Family.

The build method of your provider has parameters. As such, when listening to your provider you need to pass those providers:
ref.watch(hWProvider(foo));

If you don't need that parameter, remove it from your build method. Then you will be able to listen to the provider without passing any value.