unable to pass controller to textfield widget class flutter code example
Example: textfield set value flutter
/// You can use a [TextFormField] instead of [TextField]
/// and use the [initialValue] property. for example:
TextFormField(initialValue: "I am smart")