I am new to flutter and trying to add a watch on a variable of a state.
Now from some FavoriteScreen cubit, if I had to watch this variable 'someKindOfList' which is present in ExploreLoaded state. How would I do it?
I tried the following:
class FavoriteScreen extends StatelessWidget {
const FavoriteScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final List items = context.watch<ExploreCubit>().state.someKindOfList <== THIS IS NOT POSSIBLE...