Flutter Provider Http Post Request Example | With Given Code | Signup Page Restful Api

  Рет қаралды 15,116

dbestech

dbestech

Күн бұрын

Flutter provider http post request example with given code. Here we used signup page for posting data to the server using a restful api.
😇😇😇😇Same app three versions Riverpod, BLoC and Getx. Check which one you like
• Flutter Getx BLoc and ...
📚📚📚
Timeline
0:00 Introduction
0:15 Demo of the app
0:43 Install provider packages
0:52 Postman data analysis
1:25 Signup model class
1:44 Create service class with http.post request
2:57 Create a data class a provider class extending changenotifier
3:47 Main.dart uses multiprovider
4:24 Sign up page
5:10 Get provider instance
Code link
www.dbestech.com/tutorials/fl...
Provider complete app
www.dbestech.com/tutorials/fl...

Пікірлер: 40
@wdavis6254
@wdavis6254 2 жыл бұрын
thank you very much. You are a life saver.
@dbestech
@dbestech 2 жыл бұрын
You're welcome!
@Astronomia.Gaming
@Astronomia.Gaming Жыл бұрын
just wow!💖
@mustafashaikh7829
@mustafashaikh7829 2 жыл бұрын
Waa alekum mussalam brother nice explain with provider waiting for this. Can u explain more how to use the response with model class.?
@dbestech
@dbestech 2 жыл бұрын
first you will return the response. Http response contains many properties. One of them is response.body. This one contains our data from network. but If you do post request you will only check response.statusCode. Here model class is used when you send data to server. First use the fields(name, email, password and phone) to make a an object. Send it to post request and decode it using toJson method(it comes from the model class)
@steev910
@steev910 2 жыл бұрын
thanks for sharing
@dbestech
@dbestech 2 жыл бұрын
My pleasure
@okeyshourovroy2769
@okeyshourovroy2769 2 жыл бұрын
Great video. ❤️❤️ Please also cover graphql client flutter with refresh token implementation. There is no video regarding this topic. 🙏❤️
@dbestech
@dbestech 2 жыл бұрын
Great suggestion!
@okeyshourovroy2769
@okeyshourovroy2769 2 жыл бұрын
@@dbestech thank you. ❤️❤️❤️🙏
@MeineFresse10
@MeineFresse10 2 жыл бұрын
Good job, thanks a lot
@dbestech
@dbestech 2 жыл бұрын
You are welcome!
@kurshadqaya1684
@kurshadqaya1684 2 жыл бұрын
Nice! Bookmarked!
@dbestech
@dbestech 2 жыл бұрын
Thanks!
@anshbansal5249
@anshbansal5249 Жыл бұрын
i am getting this error _CastError (Null check operator used on a null value) on this line http.Response response = (await register(body))!; help please
@jinsungnichan9363
@jinsungnichan9363 2 жыл бұрын
your too goood allah yahafdaak
@dbestech
@dbestech 2 жыл бұрын
welcome
@dramaticsports
@dramaticsports 2 жыл бұрын
Waiting for Todo app using Provider and Firebase. Sir me my friends waiting for you.Thank you♥️
@dbestech
@dbestech 2 жыл бұрын
here is a quiz app that uses firebase www.patreon.com/posts/63323762
@prajeshkayastha9416
@prajeshkayastha9416 Жыл бұрын
when I try to initialise register in DataClass like u did, it says "Try correcting the name to the name of an existing method, or defining a method named 'register'" ? what to do?
@dvoicespec5324
@dvoicespec5324 Жыл бұрын
Thank u
@dbestech
@dbestech Жыл бұрын
Most welcome
@tonhom260
@tonhom260 2 жыл бұрын
thankyou
@dbestech
@dbestech 2 жыл бұрын
welcome
@maxxy-r3q
@maxxy-r3q Жыл бұрын
hello sir, are u have video about login section?
@mkhwanazicebo4448
@mkhwanazicebo4448 2 жыл бұрын
nice video, but how did u make the database and all the other steps till you got to the step u in in postman. plz help
@dbestech
@dbestech 2 жыл бұрын
Ok. For this would it would be a long tutorial. You may watch kzbin.info/www/bejne/p5LTk2CVnLKNiNU to help you
@mustafashaikh7829
@mustafashaikh7829 2 жыл бұрын
I've one more doubt if we have multiple api so we need to create multiple services class.?
@dbestech
@dbestech 2 жыл бұрын
Not for multiple api, if you have multiple changeNotifier, you may need to use multiple provider. within in myapp, you need to use MultiProvider which takes a list of providers.
@Harry-ju9nv
@Harry-ju9nv 2 жыл бұрын
Sir please create a video on how to deal with AR model
@dbestech
@dbestech 2 жыл бұрын
will try
@shoeswholesalerforreseller7633
@shoeswholesalerforreseller7633 2 жыл бұрын
Hi sir Can I make use of provider for complex projects?
@dbestech
@dbestech 2 жыл бұрын
Yes, you can. It's same as Getx. If you understand getx well, you will see provider is easier too
@TrikNgonlen
@TrikNgonlen 2 жыл бұрын
Did you use Laravel for the backend?
@dbestech
@dbestech 2 жыл бұрын
Yes. But any backend is ok
@TrikNgonlen
@TrikNgonlen 2 жыл бұрын
@@dbestech I see...for the beginner, like me, one framework (in this case the backend) will help me stay focus build "something" works... Thank you...
@linamahayni1844
@linamahayni1844 2 жыл бұрын
Thanks 🌷 How can I write a code Login please?
@dbestech
@dbestech 2 жыл бұрын
for login, you need to set up variables and listen for the response of the server. it's actually easy. But I am not sure about your questions. You need to ask me in more detail.
@JulioHernandez-hb2sd
@JulioHernandez-hb2sd Жыл бұрын
@@dbestech In postman you can use the authorization field with a username and password, how can we go about implementing that to this same example?
@dbestech
@dbestech Жыл бұрын
@@JulioHernandez-hb2sd you need to generate authorization token using a server and then pass it from post method
Bye Bye Getx | From Getx to Provider State Management
13:55
dbestech
Рет қаралды 18 М.
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 32 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 58 МЛН
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 4,6 МЛН
Sending a Post Request | Angular HTTP | Angular 13+
16:56
procademy
Рет қаралды 65 М.
What is REST API?
4:55
Postman
Рет қаралды 41 М.
Flutter Provider EASY Tutorial
9:43
Flutter Mapp
Рет қаралды 46 М.
REST vs HTTP APIs in API Gateway (1/2)
11:25
Be A Better Dev
Рет қаралды 45 М.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter
Рет қаралды 448 М.
Лучший браузер!
0:27
Honey Montana
Рет қаралды 1 МЛН
8 Товаров с Алиэкспресс, о которых ты мог и не знать!
49:47
РасПаковка ДваПаковка
Рет қаралды 173 М.
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 63 МЛН
Проверил, как вам?
0:58
Коннор
Рет қаралды 272 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 540 М.