Bloc: Bloc Library Timer Tutorial Incorrect Syntax

Created on 29 Jul 2020  路  2Comments  路  Source: felangel/bloc

The tutorial at https://bloclibrary.dev/#/fluttertimertutorial seems to have a syntax error due to an update in the bloc package.

In the UI tutorial where the action buttons are being built. The BlocBuilder uses named parameter "condition" which is being flagged as not a named parameter. Reading your documentation and the tutorial text below I believe this should be "buildWhen" instead.

Code:

      BlocBuilder<TimerBloc, TimerState>(
        condition: (previousState, state) =>
            state.runtimeType != previousState.runtimeType,
        builder: (context, state) => Actions(),
documentation example

Most helpful comment

Thanks! No Problem, thanks for the very detailed tutorials so far.

All 2 comments

Hi @bfbenf 馃憢
Thanks for opening an issue!

I'm currently in the process of rewriting all of the tutorials and will get to the timer as soon as possible. In the meantime you can refer to the example to work through an discrepancies. Sorry for the inconvenience!

Thanks! No Problem, thanks for the very detailed tutorials so far.

Was this page helpful?
0 / 5 - 0 ratings