I am trying to loop all the key/value pairs on a Firestore document which I pass to the custom action.
I have the below code
but the parser indicates the following error:
The method 'data' isn't defined for the type 'UsersCarsRecord'. Try correcting the name to the name of an existing method, or defining a method named 'data'.
On line 15 I have a print action. This is the carRecord object that is passed to this action:
UsersCarsRecord(reference: users_cars/NFLpjdA5UvNSrf4mZkEM, data: {ft_cuprice: 158963, matrixLamps: false, lta: false, winch: false, sboxa: false, fat: false, mc_curgbox: Automatic dual-clatch, sbh: false, fstc: false, skidplates: true, acc: false, ctrack: false, tf_curCO2: 250, sparew: false, eaps: true, intsens: true, blueconn: false, lsfs: false, ecdm: false, cnh: false, fllights: false, immo: false, cam360: true, fadm: true, ers: false, fca: true, abs: false, rsr: false, usbfront: false, apw: true, hac: true, rsensw: false, hsw: false, telac: false, tsens: false, edss: false, eps: true, apcab: true, split402040: false, tf_accel: 4, mc_curengine: Petrol, rpsr: false, hdm: false, gbs: true, vfs: false, fcd: false, gbox: false, fvc: false, ctrackimmo: false, adaptiveLamps: false, mcc: false, esa: false, esp: false, ecc2: false, rctab: false, ahl: false, nofspeaks: 16, tf_maxspeed: 250, ita: false, usbrear: false, pss: false, user: DocumentReference<Map<String, dynamic>>(users/Yd9ie64KLkhYW8K7b9SzLOGQrIi2), rpd: false, ahb: false, lockdiff: false, epb: false, wfcap: false, offdmchoice: [Gravel, Grass, Dirt/Trail], vrs: true, bsm: false, carAdditionalFeatures: [], dd_curnoru: New, ffl: false, rca: false, dsm: false, ft_model: Vanquish, ltsw: false, rvc: false, aacab: false, vsc: false, midsize: 14, afdm: true, arfhl: false, tf_bootCap: 450, fssparew: false, ftb: false, dgw: false, ies: false, ledday: false, rslsl: false, eads: false, dab: false, dssize: 7, rcta: false, eow: false, pcs: true, privg: false, alarm: false, ecc: false, alh: false, trk: false, ambil: false, mc_curseatmat: Leather, ledLamps: false, fmd: false, tf_curfueleff: 10, ars: false, rvmc: true, date_added: 2024-01-12 22:42:54.596, eeaef: false, mid: false, tf_tankCap: 90, trs: false, hfs: false, fps: false, fpsr: false, soc12v: false, hrs: false, ecc3: false, pudl: true, mc_curcarsize: S-segment sport coupés, mrt: false, split6040: false, seass: false, easc: false, rvmd: false, dmel: false, rfl: false, pds: false, mpwc: false, fsr: false, dd_make: Aston Martin, telacmem: false, rps: false, tf_curPower: 500, aaw: false, pam: false, tpws: true, fpd: true, tsc: false, hdc: false, rsa: false, rrack: false})
In my opinion, it should work but I couldn't find any reason why I am getting the error.
Can anyone help me with this, please? I was trying to use Chat GPT as well - it validated the code, OK yet it is still giving me the error.
Thanks!