Flutter bloc infinite list - A sample application to learn flutter bloc the correct way

Overview

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

You might also like...

📜Infinite View Pager widget for Flutter

📜Infinite View Pager widget for Flutter

infinite_view_pager Flutter infinite view pager widget Installation dependencies: infinite_view_pager: ^1.0.0 Example import 'package:infinite_view_

Feb 25, 2022

A small library support load infinite for ListView - GridView on Flutter.

A small library support load infinite for ListView - GridView on Flutter.

Paging A Flutter package that supports pagination(load infinite) for ListView, GridView Demo DataSource PageKeyedDataSource To create a PagingListView

Dec 4, 2022

A customizable carousel slider for Flutter. Supports infinite sliding, custom indicators, and custom animations with many pre-built indicators and animations.

A customizable carousel slider for Flutter. Supports infinite sliding, custom indicators, and custom animations with many pre-built indicators and animations.

Flutter Carousel Slider A customizable carousel slider for flutter Screenshots Installing dependencies: flutter_carousel_slider: ^1.0.8 Demo Demo a

Nov 6, 2022

This widget automatically scrolls the custom child widget to an infinite loop.

This widget automatically scrolls the custom child widget to an infinite loop.

Scroll Loop Auto Scroll This widget automatically scrolls the custom child widget to an infinite loop. Example Features Infinite Auto Scroll Custom ch

Dec 12, 2022

A quick sample app on how to implement a friend list and a profile page in Flutter.

A quick sample app on how to implement a friend list and a profile page in Flutter.

FlutterMates All code resides in the /lib folder: there's no Android / iOS specific code needed. The article, slides and how this came to be, is here.

Jan 8, 2023

Learn how to use Dart List Utility Methods in Flutter

Learn how to use Dart List Utility Methods in Flutter

Flutter Tutorial - List Utility Methods Learn how to use Dart List Utility Metho

Dec 29, 2021

Horizontal list - A horizontal list widget to use in mainly for web or desktop application

Horizontal list - A horizontal list widget to use in mainly for web or desktop application

horizontal_list A horizontal list widget with buttons next and previous. You can

Feb 2, 2022

This is my way to build a Tagged Search Field that display a list with suggestions while the user type.

This is my way to build a Tagged Search Field that display a list with suggestions while the user type.

tagged_search_field This is my way to build a Tagged Search Field that display a list with suggestions while the user type. A regular search field at

Nov 5, 2021

🌰🌰 [BLOC_PATTERN] [RXDART] [STREAM] 🍄🍄 Simple auth app flutter, server node.js, BLoC pattern, RxDart 🍁🍁 Functionalities: LOGIN, REGISTER, CHANGE PASSWORD, CHANGE AVATAR, FORGOT PASSWORD. Pure rxdart BLoC pattern. BLoC pattern without library.

🌰🌰 [BLOC_PATTERN] [RXDART] [STREAM] 🍄🍄 Simple auth app flutter, server node.js, BLoC pattern, RxDart 🍁🍁 Functionalities: LOGIN, REGISTER, CHANGE PASSWORD, CHANGE AVATAR, FORGOT PASSWORD. Pure rxdart BLoC pattern. BLoC pattern without library.

node_auth #node-auth-flutter-BLoC-pattern-RxDart ❄️ ❄️ BLoC pattern rxdart stream 🐋 🐋 Simple auth app flutter, server node.js, BLoC pattern, RxDart

Dec 29, 2022
Owner
Anoop TM
Crazy about Flutter!
Anoop TM
🎨 An opinionated, effective and correct way to provide multiple themes to your app.

theming This is an opinionated and effective way to provide multi-theme choice for your app. theming depends on provider and shared_preference for sta

Chinyeaka Chinonso 3 Nov 28, 2022
Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map.

Custom Radio Group List Flutter package to create list of radio button, by providing a list of objects it can be a String list or list of Map. Feature

Ashok Kumar Verma 0 Nov 30, 2021
This application was created using the Dart language and it is an application that contains a set of different questions and at the end shows you the number of correct answers you have answered , made by flutter

exams_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

null 0 Dec 28, 2021
Internationalized dialog for picking a single month from an infinite list of years.

month_picker_dialog Internationalized material style dialog for picking a single month from an infinite list of years. This package makes use of the i

Dimitri Krivoj 65 Nov 30, 2022
🌈 Repository for a compass project, basically an App for displaying bank transfers, with API requests, Flag persistence, Infinite Scroll, Error Handling, Unit Tests, Extract Sharing working with SOLID, BLoC and Designer Patterns.

?? Green Bank Aplicação desenvolvida em Flutter com intuito de trabalhar conexão com API, Gerenciamento de estado usando BLoC, Refatoração, Arquitetur

André Guerra Santos 28 Oct 7, 2022
Flutter package to get keyboard height. Can be used to display a sticker/emoji modal with correct height.

flutter_persistent_keyboard_height Flutter package to get keyboard height. The height is persisted during app sessions and keyboard states (you can us

Arshak Aghakaryan 13 Oct 17, 2022
An Ai Game That Solve The problem of finding the correct path from source to destination

Monkey And Banana AI Game An Ai Game That Solve The problem of finding the correct path from source to destination . Use BeathFirst Algorithm. Game Ap

null 0 May 10, 2022
This Repository is contain about learn Flutter and Dart [Learn]

Flutter-Dart-Code-Learn-Journey This Repository is contain about learn Flutter and Dart [Learn] Introduction Learn Dart Data Type Control Flow Collect

Adi Nugraha Putra 1 Jan 11, 2022
null 1 Jan 8, 2022
The easiest way to create your animated splash screen in a fully customizable way.

Animated Splash Screen Check it out at Pub.Dev Do it your way Assets image Custom Widget Url image IconData Or just change PageTransition and/or Splas

Clean Code 104 Nov 10, 2022