Thanks Andrea for making such highly informative videos on flutter.
@progamer11964 жыл бұрын
@Andrea whenever we call 'setState()' the complete widget and its children are built, is this the same case in BLoC and provider implementation?
@CodeWithAndrea4 жыл бұрын
You would not normally use StatefulWidget+setState with BLoC. Rather, you would take the output stream from a BLoC and feed it to a StreamBuilder, which rebuilds your UI.
@progamer11964 жыл бұрын
@@CodeWithAndrea Ok thanks. Actually my real issue is that I am loading a lot of network images in a widget (around 100), so if I load them through stream builder (say by providing the image url), will it make the network call again when the widget is being rebuilt (like during push, pop navigation)?
@thewalkevent8894 жыл бұрын
This is a very good tutorial. I have a question. How can I use pageview or tabbarview in a stateless widget?
@snooringcode65944 жыл бұрын
So which one is a good choice to go with?
@CodeWithAndrea4 жыл бұрын
Depends in your use case. I often use Provider+ChangeNotifier for local state that needs to be shared across widgets, and Provider+Bloc when working with streaming APIs (e.g. Firebase).
@snooringcode65944 жыл бұрын
@@CodeWithAndrea Can we achieve the size of flutter apps just like native android or ios app sizes?
@Surimi8884 жыл бұрын
On the subject of ValueNotifier, in what scenario would you use ValueListenableBuilder over ChangeNotifierProvider?
@CuiqkOfficial4 жыл бұрын
When you don't want to use provider package.
@Surimi8884 жыл бұрын
@@CuiqkOfficial Could you give an example of when you wouldn't want to use provider?
@belqisshida53455 жыл бұрын
how to avoid unnecessary rebuilds? example: Widget A. Widget B. Widget C. Here when I update a state in Widget A with provider, the Widgets B and C rebuilds too. So how to avoid unnecessary rebuilds in B and C ?
@CodeWithAndrea4 жыл бұрын
Keep an eye of my upcoming videos on Provider. I cover this issue there.
@martymcfly61645 жыл бұрын
Hi Andrea, I have a problem with the Stream builder authentication with firebase. I followed your tutorial "Flutter & Firebase authentication with streams and StreamBuilder", everything works fine, except the HomeScreen is not returned visible when I log in on a different page than the SignInPage (I pushed a new route to a SignUpPage). The reason is (as far as I understand) that HomeScreen and SignInPage are only switched below, invisible, under the SignInPage. What is the best solution to fix this? Thanks in advance!
@CodeWithAndrea5 жыл бұрын
Hi Marty. You are correct, this is what happens when you push a new route. The best way to address this is to add a call to Navigator.pop() right after the sign in call succeeds. That way the page is dismissed and you are taken to the HomePage.
@emyboybeats43305 жыл бұрын
which is better for scaleable apps setState, BLoC, ValueNotifier, Provider?
@CodeWithAndrea5 жыл бұрын
Emyboy Beats It depends. For local application state, I recommend Value/ChangeNotifier + Provider. If you have a real-time backend, or stream-based APIs, then BLoCs work well. And StatefulWidgets + setState when working with text input & forms.