Home > database >  How to access data from TextField widget from module without navigating
How to access data from TextField widget from module without navigating

Time:10-25

enter image description here

onPressed, of "Start Picker" button I want to get data from TextField which resides in blockRow.dart file/module. To maintain clean code, I have created module for each but don't know how to access the data.

TextField controller is created and works smoothly. No error so far in design.

Screenshot

CodePudding user response:

You need to define TextField controller in home page and pass it to blockrow throgh constructor. Also pass those controller to buttonRow too, then automatically when TextField get its value you can use its value with controller.text in buttonRow.

  • Related