Тёмный

Flutter Validation with Provider 

Andy Julow
Подписаться 8 тыс.
Просмотров 11 тыс.
50% 1

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

Наука

Опубликовано:

 

1 апр 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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.
@chetan6406
@chetan6406 4 года назад
Clear , concise and very well explained...thanks for this video.
@marcelo4205
@marcelo4205 4 года назад
Thanks a lot, Andy. Great video and very well explained.
@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.
@phuongnhi7859
@phuongnhi7859 3 года назад
thank you for your video. It's helpful to me
@sakwebetrandcliff1151
@sakwebetrandcliff1151 2 года назад
Thanks for the tutorial, it was explicit.
@MrAidooyaw
@MrAidooyaw 4 года назад
I'm going to check out that validation provider package First time I'm seeing such a thing
@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.
@aminafrazandeh825
@aminafrazandeh825 9 месяцев назад
nice video , it helped me!
@fouad_alshamy
@fouad_alshamy 4 года назад
Good job Andy
@reach5593
@reach5593 Год назад
Thanks Andy!
@kev001able
@kev001able 4 года назад
Great video 👍🏼
@jahangirshah2747
@jahangirshah2747 Год назад
Thank u very much sir.
@jofercho
@jofercho 2 года назад
beautiful
@MrAidooyaw
@MrAidooyaw 4 года назад
I like this pattern more than the normal form widget whereby u have to press the submit button before validation works
@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
@AlexAstudillo1
@AlexAstudillo1 2 года назад
Hello, how to set internalizations, for example in the error message multilanguage English "Error length" Spanish "Error de longitud"
@nikhilpatil8798
@nikhilpatil8798 3 года назад
Thank u so much really appreciate it. Can u increase the font size? The font size is too small.
@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.
@asif_imtiaz
@asif_imtiaz 2 года назад
it would be awesome if you could add in, how to reset the TextField values after submit button.
@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
Managing state in Flutter with Provider (Version 3)
29:01
Flutter Form Validation with Provider and Bloc
31:43
Просмотров 13 тыс.
Firestore CRUD with Flutter
1:07:24
Просмотров 21 тыс.
Pragmatic State Management in Flutter (Google I/O'19)
33:25