handle changes of form fields in flutter

How to disable submit button unless forms form fields are edited/changed in flutter dart?
I’m able to disable the submit button when form fields are empty but i want to disable it when they are edited

2 thoughts on “handle changes of form fields in flutter”

  1. For this king operation use Stream or any state management solutions. this is just a basic example. I hope this may help you.

        var textValue = "";
                onChanged :(v){
                 textValue =  v;
          onPressed: textValue.isEmpty
                     ? null
                      : () {
                            // do something
                    child: Text("Button"),

    Button will be disabled onPressed has null or not implemented!


Leave a Comment