Flutter: YouTube Search 05 – Search UI – BLoC Tutorial Course

Welcome back to the 5th part of the Flutter YouTube Search tutorial course. In the previous part we’ve added the state management layer which in our case is a BLoC. We already have the means to start searching for YouTube videos and also to utilize pagination so that we don’t load all of the data at once.

Now that we have all that, we need to create a UI to display this data in. In this tutorial, you are going to learn how to create custom Flutter widgets, how to work with a BLoC and how to use the Kiwi dependency injection library for Flutter. In the next part you are going to learn how to create the paginated list view.


👉Get the code from this tutorial👈


Matej Rešetár

Matej is an app developer with a knack for teaching others. If he's not programming, making tutorials or doing other business, he's mostly working out, listening to audiobooks and taking cold showers.

  • Great work from a talented developer.
    Keep it up.

  • Rafael says:

    Hi, i was following this series of tutorials, great work, by the way!
    Today following the last one (5 Search UI) i ran into the following issue:
    I/flutter (27214): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
    I/flutter (27214): The following _CompileTimeError was thrown building Builder:
    I/flutter (27214): ‘package:bloc/src/bloc.dart’: error: line 24 pos 44:
    I/flutter (27214): file:///opt/flutter_v1.0.0/.pub-cache/hosted/pub.dartlang.org/bloc-0.8.4/lib/src/bloc.dart:24:44:
    I/flutter (27214): Error: No named parameter with the name ‘seedValue’.
    I/flutter (27214): _stateSubject = BehaviorSubject(seedValue: initialState);
    I/flutter (27214): ^^^^^^^^^
    I/flutter (27214): _stateSubject = BehaviorSubject(seedValue: initialState);
    I/flutter (27214): ^

    The error is raised by line 9 of search_block.dart (SearchBloc(this._youtubeRepository) : super();)
    called by injection_container.dart by kiwi.

    ¿Any idea of why this error happens?

  • >