0

I am new to flutter and trying to add a watch on a variable of a state.

enter image description here enter image description here

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...
Biswas Khayargoli
  • 976
  • 1
  • 11
  • 29

0 Answers0