title: Get access to the last yielded state within the Flutter BloC
body: <p>I have two screens: first one is list of items and second is the form page for editing or creating items. Each page is managed via dedicated BloC - <code>ItemListBloc</code> and <code>FormBloc</code> respectively, using <code>flutter_bloc</code> library. Whenever the submit is called on the Form I want to react to this in <code>ItemListBloc</code> and modify or insert item in the list to avoid refetching whole thing from the backend.</p>
  
  <p>This is how I try to achieve this:</p>
  
  <pre><code>  ItemListBloc({ @required this.itemFormBloc, ... }) {
      itemFormSub = itemFormBloc.state.listen((state) {
        if (state is FormSubmitted) {
          dispatch(ModifyOrInsert(isEdit: state.isEdit, item: state.isItem));
        }
      });
    }
  
    @override
    Stream&lt;ItemListState&gt; mapEventToState(
      ItemListEvent event,
    ) async* {
      if (event is ModifyOrInsert) {
        yield* _modifyOrInsert(isEdit: event.isEdit, item: event.item);
      }
    }
  
    Stream&lt;ItemListState&gt; _modifyOrInsert({bool isEdit, Item item}) async* {
      // How to get access to the list of items here?
    }
  
  </code></pre>
  
  <p>Unlike Redux-y global state I have number of states which I can manipulate and declare one of them current. The last state of <code>ItemListBloc</code> is typically <code>ItemsLoaded</code> which holds the whole items list. I need to get access to this state, take items, update item in list if it was an edit, prepend item to the list if it was create and silently <code>yield</code> updated <code>ItemsLoaded</code> state afterwards.</p>