how can I get the control value of these dynamic fields
class DyDataList with ChangeNotifier {
final List<DyData> _dyDataList = [
DyData(
filedName: "Full Name",
control: "TextBox",
source: "",
hintText: "e.g John ",
contolValue: "",
),
DyData(
filedName: "Age",
control: "TextBox",
source: "",
hintText: "e.g 18",
contolValue: "",
),
This is my FormScreen
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text("Form"),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: Form(
key: _formKey,
child: ListView.builder(
itemCount: dyData.length,
itemBuilder: (ctx, i) => ChangeNotifierProvider.value(
value: dyData[i],
child: WidControls(
),
),
),
),
),
);
I need these controller values on submit button