title: Flutter BLoC - How to pass parameter to event?
body: <p>Trying to learn BLoCs I came up with this problem. I have some code in which I generate some buttons with BLoC pattern. However, I have no clue how to update specific buttons properties with <code>dispatch(event)</code> method. How to pass parameters to the event <code>ChangeSomeValues</code>??</p>
  
  <p>The part where the BLoC is used</p>
  
  <pre><code>BlocBuilder(
    bloc: myBloc,
    builder: (context, state) {
      return ListView.builder(
        itemCount: state.buttonList.length,
        itemBuilder: (context, index) {
          return MyButton(
            label: buttonList[index].label,
            value: buttonList[index].value,
            onPressed: myBloc.dispatch(ChangeSomeValues()),
          );
        }
      );
    }
  ),
  </code></pre>
  
  <p>MyBloc.dart</p>
  
  <pre><code>class MyBloc extends Bloc&lt;MyEvent, MyState&gt; {
  
    @override
    Stream&lt;MyState&gt; mapEventToState(MyEvent event) async* {
      if (event is ChangeSomeValues) {
        ... modify specific parameters in list here ...
        yield MyState1(modifiedList);
      }
    }
  }
  </code></pre>
  
  <p>I know how to use the events to change values but I couldn't find how to edit specific parameters in list with this kind of a generic implementation.</p>