State and Api Integration in Flutter - Flutter Web Tutorial Part 4

preview_player
Показать описание

---

In this tutorial We take the existing Flutter Web app and add the provider architecture to it and also integrate a simple http request.

Рекомендации по теме
Комментарии
Автор

Please Make More Of This !!!! WebApps are soo dope and you explain it so well. What really cool is I have a finished product once im done watching your vids

PjamaLama
Автор

More awesome work from FilledStacks! Thanks!

tylerthornton
Автор

Thanks for the video... Where should we use try catch and custom loader variable? In a service class or view model?

usmanhafeez
Автор

Thank you for this tutorial. :) Great Documentation

sandraperez
Автор

Hello Sir
There something wrong with part 4. In part 3 we were using the navigation_bar_tablet_desktop.dart, you are now talking about navbar_item_desktop.dart, with a class NavBarItemTabletDesktop. You are not saying it should be created, but open. Well, we did not have that in part 3. Even if I download the start code you refer to at the start of part 4, it does not even have the folder navigation_bar. So it is now confusing as a beginner. Can you please make the necessary corrections or advice. navbar_item_mobile.dart., we had navigation_bar_mobile.dart.. Please what is what. Thanks

Boameooo
Автор

It seems this is part 4, but listed as part 5 in the playlist...
When I reach 6:09, the intermediary step before implementing the final API, my status quo does NOT work. I compare as much as possible with the start and final versions of your github repo, but this very state in the video is nowhere, so I am lost. The specific problem that occurs is in "episode_list.dart", where the spread operator suddenly complains (being an experimental feature... which was true for Dart <2.3... but I have 2.8).
Also in "episodes_view.dart" the "EpisodesList(episodes: model.episodes)" causes an error: "The argument type 'List<Map<Sting, Object>>' can't be assigned to the parameter type ''List<EpisodeItemModel>".
I am comparing back and forth, but cannot find the culprit. Do you happen to have an idea? (Up to this point there is no "onModelReady()" implemented, but I assume, since the episodes list is still static at this time, there is no need for it; on the other hand I do not really understand, how the static list of episodes is handed over to the model parameter of the EpisodesView class? Simply by importing the "episodes_view_model.dart" class?)

EDIT:
The problem with the not assignable argument type in "EpisodesList(episodes: model.episodes)" disappears, when in EpisodesViewModel the "final episodes" is given a List type: "final List episodes". But that still does not remove the spread operator problem...

SOLUTION:
Man... My local flutter creates a Dart SDK dependency for version 2.1 (in "pubspec.yaml", under "environment"). It needs to be set to at least 2.3... Me is big idiot!
Sorry for wasting your and anybody else's time!

RobertWildling
Автор

Hi sir, 'just following your tutorials recently and in this part as per checking the provider_architecture in pub.dev it was already deprecated. what was that mean? should I continue with this approach?

tomcalvien
Автор

Up until this episode, this series was fantastic to follow. I don't want to negatively criticise the series because I understand why you have made changes off camera, however, I would have continued through every tutorial within the series but the changes that you have made, without explanations make this impossible to follow further with a deep understanding.

Jumping through sections with the expectation that your users will download the project files to continue disconnects your audience completely. For instance, I didn't use any of your starter files as when I am learning a new framework, I like to write the code myself and having to just throw that away now to download a project is not ideal.

As I said, I honestly appreciate everything you are doing but I just wanted to point that out as I can no longer continue your series comfortably.

GameDevGuy
Автор

Hello Dane, I am not a web dev too, but circumstances have force me to use flutter web for a simple site. I get this Cors error, which I find very strange because it works on mobile but web browsers need more attention lol, in flutter you can disable it manually by deleting some files but when I deploy in with firebase I now face the issue, I tried using cloud function and it doesn’t work, say. I want to know if you used cloud functions to fix the problem or anyway you get around this Cors issue. It’s an issue I have been sitting on for two weeks and I am stressed. If you have a repository where you fixed it can I see it, or if you some me some code snippet, I would really appreciate it

devraphe
Автор

Sooo.... I've been looking around for how to handle tokens for APIs as I do not want to have this information within the application because anyone (with computer skills) would be able to get that information. Do you have any thoughts about how to hide the info?

Ambrose_Heria
Автор

i am trying to use popupmenubutton in Layout Template but it gives an error
=>
No Overlay widget found.
Tooltip widgets require an Overlay widget ancestor for correct operation.
The most common way to add an Overlay to an application is to include a MaterialApp or Navigator widget in the runApp() call.

Any solution for this?

bibash
Автор

openDrawer does not work. Has something to do with that ScaffoldState do not accept that openDrawer can be null. How to fix that?

rolferikson
Автор

Hi, in my flutter android app, i have the MENU (HOME, Category, Search etc.) in the Footer. But when i build it for my Web version, it also comes in the same place, but i want the MENUs should come in the TOP menu navigation like other websites menu. Could you please make a video with source code example? how to customize the flutter android Footer menu to Flutter Web Top Menu? So that when i build it, for android, it should be in footer and for web it should be in To navigation.

prakashcs
Автор

Having an issue with ViewModelProvider looks like I have to use ViewModelBuilder instead of 'ViewModel: EpisodesViewModel()' but i get the error : "The argument type 'EpisodesViewModel' can't be assigned to the parameter type 'EpisodesViewModel Not sure how to handle this. Thanks!

djcali
Автор

can Rest API work in flutter web? i got error when i use same code flutter web

vastravibetraditionalfashi
Автор

I used the firebase realtime database (REST api) and got a similar error because I forgot to add a .json at the end of the url. Your error helped me solve that :) thanks

MrJona
Автор

Not sure if anyone faces the same error but when I imported 'package:http/http.dart' as http; this error occurs:

Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

`import 'package:http/http.dart' as http;`

Edit: The issue was that I was on beta channel. Once I switched to master, there is no more issue.

rachsounds
Автор

Is provider_architecture package made by you?

harshptl
Автор

the error is due to apache CORS enable for both domain and headers

nasonibrahim
Автор

Not good when building from the last part of the tutorial. :/

physikus
visit shbcf.ru