hi i'm looking for a way to cast String variable into TextEditingController
final TextEditingController _testController=TextEditingController();
and this is what i'm doing
var test = "_"+"testController"
and inside TextFormField
Controller
i'm calling controller like this
TextFormField(
controller: test,
),
I know i could've just called it by the name of TextEditingController
_testController
but i have to do it this way, any ideas how ? i tried casting
the variable
to TextEditingController
but i get this error saying that
type 'String' is not a subtype of type 'TextEditingController' in type cast