Skip to content

anoop-ananthan/flutter_bloc_infinite_list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_bloc_infinite_list

A sample application to learn flutter bloc the correct way. Took some deviations from the tutorial and based on the experiance here are some notes to self:

  1. You can do many things with Cubit and don't need Bloc all the time. In this example, there are transformation using events, debounce etc... Therefore, Blocs is really needed here.

  2. Using enumeration for the loading status is better than writing specific classes for each state as it increases boilerplate code.

  3. I love bloc! ❤️

Getting Started

This application is inspired from the bloc tutorial.

Project Structure

Follows a feature-driven directory structure.

Refer the project structure directly from the tutorial from here.

├── lib
| ├── posts
│ │ ├── bloc
│ │ │ └── post_bloc.dart
| | | └── post_event.dart
| | | └── post_state.dart
| | └── models
| | | └── models.dart*
| | | └── post.dart
│ │ └── view
│ │ | ├── posts_page.dart
│ │ | └── posts_list.dart
| | | └── view.dart*
| | └── widgets
| | | └── bottom_loader.dart
| | | └── post_list_item.dart
| | | └── widgets.dart*
│ │ ├── posts.dart*
│ ├── app.dart
│ ├── simple_bloc_observer.dart
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml

Useful Links

About

A sample application to learn flutter bloc the correct way.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published