How to get "Rep Count"?
Approach 1: using BlocSelector in Widget's build method
BlocSelector<WorkoutSetBloc, WorkoutSetState, int?>(
selector: (state) {
return state.repsDone;
}, builder: (context, state) {
return Text(
"${state!}",
style: GoogleFonts.openSans(
color: Colors.black,
fontSize: 58,
fontWeight: FontWeight.w700,
),
);
}),
Approach 2: using BlocProvider.of
BlocProvider.of<WorkoutSetBloc>(context).state.repsDone