How to create and validate forms in Flutter

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 77

  • @TheFlutterFactory
    @TheFlutterFactory  5 років тому +9

    If you want to add multiple widgets in the same row, just add them to a Row widget to get the desired look. Leave a thumbs up if this video was helpful. I will be posting more Flutter videos in the near future.

  • @MoAdel92
    @MoAdel92 4 роки тому +16

    u didnt mention that u removed "=>" in 11:00
    i spent 5 mins figuring out why "return" is red

    • @ojgg14
      @ojgg14 3 роки тому

      Thank youuuu didnt notice either :((

    • @MoAdel92
      @MoAdel92 3 роки тому

      @@ojgg14 not at all
      We beginners always have these issues

  • @mulkproject687
    @mulkproject687 4 роки тому +1

    bro thank you for this video.. how can i add the post API for this i have URL on my test woocommerce site and i want to create registration form following ur tutorial, the part where im stuck is the last part sending it to the actual url :

  • @omarmehrez3363
    @omarmehrez3363 4 роки тому +4

    How Can i send the Input to a database or Mail ?

  • @parvneema
    @parvneema 4 роки тому +1

    Very nicely explained. Keep it up!

  • @acarvey
    @acarvey 3 роки тому +1

    Great video thanks so much! You covered a lot of bases!

  • @rutuja7293
    @rutuja7293 3 роки тому +1

    Can you please make a video where we can upload mutiple files(maxlimit:4-5), to the server using flutter. I have used file_picker but finding the multi_file_picker difficult.

  • @pawanmandal8787
    @pawanmandal8787 4 роки тому +1

    sir i was a created a app how can separate user and admin if user login to show page another page and admin login to show another page

  • @ninjathestreet2848
    @ninjathestreet2848 3 роки тому +2

    thanks for the help :)

  • @thuththufulhu
    @thuththufulhu 4 роки тому +2

    i would like the validation to work as I type instead of after submit. How can we do this. Thanks for your videos. Very helpful.

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      I won't always be able to cover every scenario that a user might have in these videos. These are just to help you with the basic concepts. Always check the documentation or do a quick Google search first. It's likely that many of people have asked and answered this question online already. I've already Googled it for you -> api.flutter.dev/flutter/widgets/Form/autovalidate.html

    • @yaseenagwan897
      @yaseenagwan897 4 роки тому

      I think you can use OnChanged event if its textbox

    • @uranussick
      @uranussick 4 роки тому

      Try filter on textfield, you can apply regex there

    • @bander771
      @bander771 4 роки тому

      You need to use BLOC with stream..

  • @prasadreddy1993
    @prasadreddy1993 4 роки тому +1

    good , but How Can i send the Input to a mysql database or Mail ?.....

  • @saiprasad8445
    @saiprasad8445 4 роки тому +1

    Can You Show how to add validation to check boxes in flutter

  • @bhupathioffice2446
    @bhupathioffice2446 4 роки тому +2

    Nice if u make it into a listview because it may overflowed pixles

  • @MarcusMoreiraSouza
    @MarcusMoreiraSouza 4 роки тому +1

    But, if I need to prefilll theses fields? Or filll some fileds based in calculations with another fields?

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      You have access to the values in all the input fields via controllers

  • @projectsilverbone9794
    @projectsilverbone9794 4 роки тому +1

    thanks a lot..it really helped me

  • @ScroatyDontKnow
    @ScroatyDontKnow 2 роки тому

    Heya, what is the best way to stop the form fields spreading out when there is an invalid field? I tried putting a sized box between them, but it the error label doesn't fill that space it adds to it.

  • @zikinable
    @zikinable 4 роки тому +1

    hai gays,,, great videos,, can u help me how to bring cursor to empty texfromfield area when klik submit ? thank you

  • @sj_vlog2
    @sj_vlog2 3 роки тому +1

    @cheetah coding..I have done similarly for add form but am facing issue in edit

  • @Fnyvids
    @Fnyvids 2 роки тому

    Thanks great video, how to keep submit button disabled untill all th evalidation passed.

  • @MrMarcowally
    @MrMarcowally 3 роки тому +2

    its cleaner to just build 1 function to build the various input forms, and then pass as arguments the different parameters

    • @TheFlutterFactory
      @TheFlutterFactory  3 роки тому +1

      Actually I see what you're saying. Have a single function and pass in the arguments to the a single text. That would work but almost every input has different property values, plus I wouldn't like the look of passing in functions for the validation and save properties. Plus if I ever want to change the look of one specific input, I don't have to do any refactoring. There's no right answer. Do whatever works for you.

  • @epi_sto_letes
    @epi_sto_letes 2 роки тому

    At level, or at what doc root, do you add code to the new git branch? At form_screen.dart? at lib? or at CWC_FLUTTER?

  • @antdinodev400
    @antdinodev400 4 роки тому +1

    thanks this helped me!

  • @karthikgowda0502
    @karthikgowda0502 2 роки тому

    The argument type 'String? Function(String)' can't be assigned to the parameter type 'String? Function(String?)?'.dart
    what is this error

  • @leandrojldp
    @leandrojldp 4 роки тому +1

    Hello!
    I'm from Brazil.
    I need an example, to create a form, where I will send emails without the need to use the gmail platform.
    Have an example of how to do it using API's

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      Nope. I've never done anything like that before. You can easily find the info on Google. Just Google 'React native email'

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      After a quick search.. blog.mailtrap.io/react-native-send-email/

  • @muhammedameen1543
    @muhammedameen1543 3 роки тому

    i have a question:
    can you please replay about what purpose do you put 'return null' on the last of the video

    • @TheFlutterFactory
      @TheFlutterFactory  3 роки тому

      I don't know which part of the video you are talking about. A timestamp would help a lot

    • @muhammedameen1543
      @muhammedameen1543 3 роки тому

      @@TheFlutterFactory I'm really sorry, this video is very helpful for me, it's a mistake

  • @jayduttbhatt3061
    @jayduttbhatt3061 4 роки тому +1

    i want to display all the details on a differernt page, what should i do

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      Use a state management solution 😀. Provider, Bloc, GetX, etc. I created videos about each of those on the channel already. "State" is a way for different widgets to access the same data store in your app (NOT the same as persistent data storage). Each of them are slightly different in their approach. Once you learn about them, it's up to you to think about which one makes the most sense. GetX is my personal favorite as an all-around state management solution.

  • @markanthonylibres5113
    @markanthonylibres5113 3 роки тому +1

    is this a good coding for dart flutter? just asking. im new in dart.

    • @TheFlutterFactory
      @TheFlutterFactory  3 роки тому

      This channel assumes that you already know the basics of Dart programming.

  • @angrygranpa5039
    @angrygranpa5039 4 роки тому +1

    is validate a built in method or did you make a validate method?

    • @angrygranpa5039
      @angrygranpa5039 4 роки тому

      nvm found the problem XD thanks for the vid man helped me a lot

  • @yavarjn2055
    @yavarjn2055 2 роки тому

    Thanks for sharing, however the elements are deprecated and the way to write the code has changed. Could you please update the content?

  • @vivekroy2629
    @vivekroy2629 4 роки тому +1

    Please tell a optimised code with dynamic textfield

  • @epi_sto_letes
    @epi_sto_letes 2 роки тому

    Does this tutorial need to be updated. My ide complains about this code, requiring me to '?', '?.' or '!'.

    • @TheFlutterFactory
      @TheFlutterFactory  2 роки тому

      Yeah this is pretty outdated now. Flutter 2 -> 3 was a major shift in the framework. If you already understand null safety it shouldn't be involve too many changes. I'll be getting back to making new videos soon.

  • @Jo-tb6ur
    @Jo-tb6ur 4 роки тому +1

    So for the passwords, what if I have ints inside?

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      Look at the TextInputType class in the docs. There are many options

  • @brijenderkumardogra7343
    @brijenderkumardogra7343 3 роки тому +1

    Thanks Bro

  • @web3tel
    @web3tel 4 роки тому +1

    I am a bit surprised there no reusable input widgets for different types of inputs. It would extremely tedious to _build* widget for every input

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому

      Sounds like a good opportunity to make an open source library. If you need something like that it would be eaay to make

    • @web3tel
      @web3tel 4 роки тому

      @@TheFlutterFactory Thank you for the response and for the video. I definitely would find it very useful. I am slightly surprised if it does exists already. I think for the start input widget will accept setter as parameter (in addition to validation parameters) and will keep state updated once whenever input changed and is valid.

  • @yeryer316
    @yeryer316 2 роки тому

    Hi, This doesn't work for me. Are you able to check the code?

    • @TheFlutterFactory
      @TheFlutterFactory  2 роки тому

      This is very outdated since 3.0 got released. I'll probably remake a lot of these videos in the near future. If you understand null safety, updating this code is pretty straightforward

  • @user-yj5hn8ky9r
    @user-yj5hn8ky9r 4 роки тому +1

    Thanks sir

  • @DguruZ
    @DguruZ 4 роки тому +1

    Nice, but what about phone number, some validations wwere missed

    • @TheFlutterFactory
      @TheFlutterFactory  4 роки тому +4

      It's not meant to be a complete app. I didn't want to focus on all possible validations. I just want to show where you put your validations and where validations would occur. You can easily find a regex online for phone numbers if you need one.

  • @nowhynot7711
    @nowhynot7711 4 роки тому +1

    Appreciated

  • @cfx3
    @cfx3 2 роки тому

    Also your github code has many errors in it when I try to run it...

  • @vikasshinde1797
    @vikasshinde1797 4 роки тому +1

    How to add red asterisk in label of textformfield
    like,
    First Name *

  • @TheMarchukav
    @TheMarchukav 3 роки тому +1

    great video, but so many things have changed since it was released. I have to dive into flutter.dev every 3 min to fix errors of null safety and other shit ;)

    • @TheFlutterFactory
      @TheFlutterFactory  3 роки тому +3

      That's the life of a software developer :) Null saftey is a HUGE improvement for dart though. Learn, Use it, and don't look back.

  • @zaidansari8338
    @zaidansari8338 2 роки тому

    👌

  • @kamithpiumal4887
    @kamithpiumal4887 3 роки тому

    GOOD

  • @cfx3
    @cfx3 2 роки тому

    Would be a lot nicer if you just started with the basics of how a form works rather than immediately adding decorations and validators...