bloc Questions
1
Solved
I'm working on a Flutter app and I've noticed that whenever I save my app to see the updated changes, my entire app reloads. I would expect the page that I have open to hot reload with my new chang...
1
Bloc's buildwhen allows you to only rebuild list items that have updated. (See the article here: How to prevent unnecessary renders in Flutter?)
Is there an equivalent feature or way of preventing ...
2
Solved
Widget build(BuildContext context) {
final appBar = AppBar(
title: Text(
"Romantic Comedy",
),
actions: [
IconButton(
icon: Icon(Icons.search),
onPressed: () {
showSearch(
cont...
Painting asked 7/7, 2021 at 4:36
2
Solved
In the bloclibrary official site documentations I have seen, I have never seen they used rx dart.
However, sometimes in the community, they saying it is much better to use rx dart together. But I d...
1
I'm building a flutter app that uses BLoC pattern and using hydrated_bloc package to persist data.
The bloc itself is working fine, ie the event comes into the bloc and the bloc yields a state back...
6
Solved
First of, I do know how BLoC suppose to work, the idea behind it and I know the difference between BlocProvider() and BlocProvider.value() constructors.
For simplicity, my application has 3 pages ...
Muhammadan asked 24/1, 2020 at 19:10
1
How to change the widgets in a list item in flutter using bloc pacakage.
Should i use BlockBuilder or listener on the whole ListView.builder or only the individual items.
It would be nice if u shar...
Foliate asked 26/6, 2020 at 13:53
3
Solved
Outline:
Navigate to profile page
Pass in user id to fetch doc from firestore
Pass the retrieved data to state.copyWith(data:data)
yield a successful status and present ui
My problem is that when...
Natatory asked 11/5, 2021 at 16:13
1
here is the situation -
my flutter app dashboard screen has two separate list
pageView on top and
List item
i have a bloc named dashboard_bloc and dashboard_event with two separate event to get ...
Sandglass asked 23/5, 2020 at 5:40
1
Solved
i'm trying to implement WebSocket in flutter using clean architecture my problem is how to get data from data source cuz in the case of using rest APIs you simply request and await data and get it ...
Estrange asked 7/1, 2021 at 14:36
2
Solved
I have Courses and Tasks. Each Course has many Tasks. That is why I am using different screens in the app to show a list of courses and after a tap on a course, I am navigating to the next screen -...
1
TL;DR: Is there a way to listen to streams and emit state using Cubit instead of BLoC?
I'm using the BLoC library for Flutter and we use Cubits for our state management. Everything is working all r...
3
I'm following BLoC pattern and subscribing to stream, and reacting to state changes in build method. When data is loaded I want to close the screen.
@override
Widget build(BuildContext context) ...
3
Solved
I'm using flutter Bloc to navigate the user toward either the login page or home screen depending on whether they are authenticated or not. However, after the initial state change, the listener doe...
Theolatheologian asked 5/2, 2021 at 18:4
2
Solved
I am trying to understand what impact does the lazy flag have. And what are the considerations for setting it as true or false?
2
I've HomeBloc from HomeView class. Basic UI architecture is as following:
HomeView extends StatelessWidget {
BlocProvider( child: HomeBody(), bloc: new HomeBloc() )
}
HomeBody extends StatefulWid...
4
Solved
I'm refactoring my app to GetX state management for less boilerplate code.
I make the Controller and the API provider (code below).
But when I want to refresh the data (Manually too) it won't chang...
Mcbrayer asked 7/10, 2020 at 21:10
4
I have a bottom nav bar that has a list page that uses a bloc for the state.
class _MainPageState extends State<MainPage> {
int _index = 0;
@override
Widget build(BuildContext context) {
...
1
I'm trying keep the state using the library hydrated_bloc, the problem is what all example of the this library are very basic and i want to maintain the state by consuming an example api rest but I...
1
I have a EmailScreen (stateful widget) that has a text input, and a button. The button is only enabled when a valid email is input.
I'm using Bloc, and my screen has InitialEmailState and ValidEma...
3
Solved
I'm creating a new app with Flutter, and I'm trying to design it, separating the business logic from the view.
I've read about Bloc and MVVM (I know there are other patterns but these were the one...
3
Solved
I'm setting up Firebase Analytics Package for my Flutter project. The sample provided in the library passes the analytics object for tracking events and observer for tracking the tab changes.
cla...
Drews asked 12/7, 2019 at 9:10
2
Solved
I have 10 buttons in main menu of my app and each of them contains BlocBuilder inside them.
So when I click on those buttons to open a new page, I want to dispatch the first event, but I don't know...
Selves asked 20/9, 2020 at 16:27
1
Inside BottomNavigation I have 2 page. 1st Page loading data from the network and showing in SliverList and In another page showing static list data.
After moving from 1st to 2nd page then 1st pag...
3
Solved
When using the BLoC pattern to isolate business logic from the view (without the bloc library), how can we trigger a one-time UI call (like showing a snackbar or an alert dialog) when some asynchro...
© 2022 - 2024 — McMap. All rights reserved.