Flutter Validation with Provider

  Рет қаралды 10,795

Andy Julow

Andy Julow

4 жыл бұрын

In this video we'll explore a pattern for validating data in Flutter using just the Provider package with no streams or BLoCs.
Article:
julow.com/article/1
Github:
github.com/nhandrew/validatio...
Social Media:
/ andyjulow

Пікірлер: 32
@blankchequecorp
@blankchequecorp 4 жыл бұрын
I have been following all your tutorials on flutter. Thanks to you I understand flutter now and i am enjoying it. Your methods of teaching is very simple, clear and comprehensive. I had to abandon the Udemy courses i am taking on flutter. I am still getting a hang of it, but with you holding my hand, I should be able to stand in a short time. Thank you very much and God bless you. Emmanuel Lagos, Nigeria
@DguruZ
@DguruZ 4 жыл бұрын
Thanks so much Andy, I've have started loving Provider
@jessiet5189
@jessiet5189 4 жыл бұрын
Nice tutorial! Clear, plain and simple. Exactly what I need. Thanks for sharing Andy.
@robsonsilv4.
@robsonsilv4. 4 жыл бұрын
Thanks Andy, you make a great serie about Provider.
@marcelo4205
@marcelo4205 4 жыл бұрын
Thanks a lot, Andy. Great video and very well explained.
@chetan6406
@chetan6406 4 жыл бұрын
Clear , concise and very well explained...thanks for this video.
@MrLyonliang
@MrLyonliang 4 жыл бұрын
Thanks a lot. I like this pattern too, which seperates business logic from UI and let the UI Reactive & Declarative, thanks again.
@philipretl9428
@philipretl9428 3 жыл бұрын
Thanks for your video, greetings from Colombia.
@scottatkinson6339
@scottatkinson6339 4 жыл бұрын
Absolutely awesome! thanks for creating the video!!!
@andyjulow4388
@andyjulow4388 4 жыл бұрын
Thanks for the topic suggestion. I like the way provider worked out here.
@MrAidooyaw
@MrAidooyaw 4 жыл бұрын
I'm going to check out that validation provider package First time I'm seeing such a thing
@sakwebetrandcliff1151
@sakwebetrandcliff1151 2 жыл бұрын
Thanks for the tutorial, it was explicit.
@phuongnhi7859
@phuongnhi7859 3 жыл бұрын
thank you for your video. It's helpful to me
@fouad_alshamy
@fouad_alshamy 4 жыл бұрын
Good job Andy
@aminafrazandeh825
@aminafrazandeh825 9 ай бұрын
nice video , it helped me!
@reach5593
@reach5593 Жыл бұрын
Thanks Andy!
@kev001able
@kev001able 4 жыл бұрын
Great video 👍🏼
@jahangirshah2747
@jahangirshah2747 Жыл бұрын
Thank u very much sir.
@MrAidooyaw
@MrAidooyaw 4 жыл бұрын
I like this pattern more than the normal form widget whereby u have to press the submit button before validation works
@jofercho
@jofercho 2 жыл бұрын
beautiful
@user-vo7lq1jt5v
@user-vo7lq1jt5v 3 жыл бұрын
Thanks for your tutorial. Your explonation was very helpfull for me. I see that because you have one provider for all fields on screen, when value changed in one field, other fields also rebuilds, isn't it better to have separate provider each field? What if for example create parent class with ChangeNotifier (for example StandartTextFieldValidation with ChangeNotifier) write there common logic and create children classes for each provider for each field in form?
@jeffersonsantosangulo1626
@jeffersonsantosangulo1626 4 жыл бұрын
thanks
@nikhilpatil8798
@nikhilpatil8798 3 жыл бұрын
Thank u so much really appreciate it. Can u increase the font size? The font size is too small.
@asif_imtiaz
@asif_imtiaz 2 жыл бұрын
it would be awesome if you could add in, how to reset the TextField values after submit button.
@double8tz
@double8tz 4 жыл бұрын
Thanks for great tutorial,but my question is does it mean that whole form rebuild each time the input form is validated?
@juniordev4190
@juniordev4190 3 жыл бұрын
Yes, whenever you trigger the notifyListeners() method, the whole UI rebuilds. To avoid a larger UI rebuild, you could use a consumer or selector widget which enables you to change a small part of the UI.
@AlexAstudillo1
@AlexAstudillo1 2 жыл бұрын
Hello, how to set internalizations, for example in the error message multilanguage English "Error length" Spanish "Error de longitud"
@MohamedIbrahim-rs7uy
@MohamedIbrahim-rs7uy 4 жыл бұрын
thank you Andy, after submitting the form i want add a navigate to a new screen how to do that? onPressed: (!validationService.isValid) ? null : validationService.submitData //here i want the navigation
@andyjulow4388
@andyjulow4388 4 жыл бұрын
Hi Mohamed, one approach would be to declare a stream in signup_validation.dart that you pass a value to in the submitdata function to indicate the record save is complete. You can then convert the signup page to a stateful widget and setup a listener to listen for changes and Navigate to the desired page.
@IbrahimAlkuwaifi
@IbrahimAlkuwaifi 4 жыл бұрын
You could also do something like this bool isValid() { if (_email.value != null && _password.value != null) { print('${_email.value} + $_password'); return true; } else { return false; } notifyListeners(); } and then in your sign in page onPressed: validationService.isValid() ? () { validationService.submitData(context); } : null, then your submit can be like this for example void submitData(BuildContext context) { Navigator.pushNamed(context, NavigationDrawer.id); }
@ihebhmida9469
@ihebhmida9469 2 жыл бұрын
don't follow this shit, thank me later :)
@badaruoluwasegun586
@badaruoluwasegun586 Жыл бұрын
Kindly share your reason as that would be appreciated.
Flutter Provider Package In Depth - StreamProvider
44:16
Andy Julow
Рет қаралды 18 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 39 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 52 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 10 МЛН
Flutter Provider Package In Depth - Change Notifier Provider
49:53
Freezed (Package of the Week)
2:57
Flutter
Рет қаралды 181 М.
Flutter Form Validation with Provider and Bloc
31:43
Andy Julow
Рет қаралды 13 М.
Provider and ChangeNotifier in 7 Minutes
7:23
Fun with Flutter
Рет қаралды 55 М.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter
Рет қаралды 448 М.
TypeScript Origins: The Documentary
1:21:36
OfferZen Origins
Рет қаралды 280 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 559 М.
FutureBuilder In Flutter - Building Lists with JSON Data
15:30
Samarth Agarwal
Рет қаралды 252 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 538 М.
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,3 МЛН
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН
Лучший браузер!
0:27
Honey Montana
Рет қаралды 977 М.